/linux-6.6.21/drivers/vhost/ |
D | iotlb.c | 28 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb, in vhost_iotlb_map_free() argument 31 vhost_iotlb_itree_remove(map, &iotlb->root); in vhost_iotlb_map_free() 34 iotlb->nmaps--; in vhost_iotlb_map_free() 50 int vhost_iotlb_add_range_ctx(struct vhost_iotlb *iotlb, in vhost_iotlb_add_range_ctx() argument 65 int err = vhost_iotlb_add_range_ctx(iotlb, start, mid, addr, in vhost_iotlb_add_range_ctx() 75 if (iotlb->limit && in vhost_iotlb_add_range_ctx() 76 iotlb->nmaps == iotlb->limit && in vhost_iotlb_add_range_ctx() 77 iotlb->flags & VHOST_IOTLB_FLAG_RETIRE) { in vhost_iotlb_add_range_ctx() 78 map = list_first_entry(&iotlb->list, typeof(*map), link); in vhost_iotlb_add_range_ctx() 79 vhost_iotlb_map_free(iotlb, map); in vhost_iotlb_add_range_ctx() [all …]
|
D | vdpa.c | 41 struct vhost_iotlb iotlb; member 69 struct vhost_iotlb *iotlb, u64 start, 72 static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb) in iotlb_to_asid() argument 74 struct vhost_vdpa_as *as = container_of(iotlb, struct in iotlb_to_asid() 75 vhost_vdpa_as, iotlb); in iotlb_to_asid() 98 return &as->iotlb; in asid_to_iotlb() 116 vhost_iotlb_init(&as->iotlb, 0, 0); in vhost_vdpa_alloc_as() 142 vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid); in vhost_vdpa_remove_as() 808 static void vhost_vdpa_pa_unmap(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, in vhost_vdpa_pa_unmap() argument 816 while ((map = vhost_iotlb_itree_first(iotlb, start, last)) != NULL) { in vhost_vdpa_pa_unmap() [all …]
|
D | vhost.c | 389 vq->iotlb = NULL; in vhost_vq_reset() 518 dev->iotlb = NULL; in vhost_dev_init() 991 vhost_iotlb_free(dev->iotlb); in vhost_dev_cleanup() 992 dev->iotlb = NULL; in vhost_dev_cleanup() 1097 if (!vq->iotlb) in vhost_copy_to_user() 1132 if (!vq->iotlb) in vhost_copy_from_user() 1213 if (!vq->iotlb) { \ 1258 if (!vq->iotlb) { \ 1338 struct vhost_iotlb_msg *vq_msg = &node->msg.iotlb; in vhost_iotlb_notify_vq() 1380 if (!dev->iotlb) { in vhost_process_iotlb_msg() [all …]
|
D | vhost.h | 132 struct vhost_iotlb *iotlb; member 167 struct vhost_iotlb *iotlb; member 191 void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_iotlb *iotlb); 246 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb,
|
D | Makefile | 19 vhost_iotlb-y := iotlb.o
|
D | vringh.c | 1120 struct vhost_iotlb *iotlb = vrh->iotlb; in iotlb_translate() local 1136 map = vhost_iotlb_itree_first(iotlb, addr, last); in iotlb_translate() 1451 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb, in vringh_set_iotlb() argument 1454 vrh->iotlb = iotlb; in vringh_set_iotlb()
|
/linux-6.6.21/include/linux/ |
D | vhost_iotlb.h | 33 int vhost_iotlb_add_range_ctx(struct vhost_iotlb *iotlb, u64 start, u64 last, 35 int vhost_iotlb_add_range(struct vhost_iotlb *iotlb, u64 start, u64 last, 37 void vhost_iotlb_del_range(struct vhost_iotlb *iotlb, u64 start, u64 last); 39 void vhost_iotlb_init(struct vhost_iotlb *iotlb, unsigned int limit, 42 void vhost_iotlb_free(struct vhost_iotlb *iotlb); 43 void vhost_iotlb_reset(struct vhost_iotlb *iotlb); 46 vhost_iotlb_itree_first(struct vhost_iotlb *iotlb, u64 start, u64 last); 50 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb,
|
D | vringh.h | 51 struct vhost_iotlb *iotlb; member 294 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb,
|
D | vdpa.h | 392 struct vhost_iotlb *iotlb);
|
/linux-6.6.21/drivers/vdpa/mlx5/core/ |
D | mr.c | 224 struct vhost_iotlb *iotlb) in map_direct_mr() argument 240 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1); in map_direct_mr() 256 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1); in map_direct_mr() 305 struct vhost_iotlb *iotlb) in add_direct_chain() argument 327 err = map_direct_mr(mvdev, dmr, iotlb); in add_direct_chain() 357 static int create_user_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) in create_user_mr() argument 372 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in create_user_mr() 387 err = add_direct_chain(mvdev, ps, pe - ps, pperm, iotlb); in create_user_mr() 396 err = add_direct_chain(mvdev, ps, pe - ps, pperm, iotlb); in create_user_mr() 460 err = vhost_iotlb_add_range(mvdev->cvq.iotlb, start, last, start, VHOST_ACCESS_RW); in dup_iotlb() [all …]
|
D | mlx5_vdpa.h | 53 struct vhost_iotlb *iotlb; member 117 int mlx5_vdpa_handle_set_map(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, 119 int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb,
|
D | resources.c | 232 mvdev->cvq.iotlb = vhost_iotlb_alloc(0, 0); in init_ctrl_vq() 233 if (!mvdev->cvq.iotlb) in init_ctrl_vq() 237 vringh_set_iotlb(&mvdev->cvq.vring, mvdev->cvq.iotlb, &mvdev->cvq.iommu_lock); in init_ctrl_vq() 244 vhost_iotlb_free(mvdev->cvq.iotlb); in cleanup_ctrl_vq()
|
/linux-6.6.21/drivers/vdpa/vdpa_user/ |
D | iova_domain.c | 35 ret = vhost_iotlb_add_range_ctx(domain->iotlb, start, last, in vduse_iotlb_add_range() 51 while ((map = vhost_iotlb_itree_first(domain->iotlb, start, last))) { in vduse_iotlb_del_range() 55 vhost_iotlb_map_free(domain->iotlb, map); in vduse_iotlb_del_range() 60 struct vhost_iotlb *iotlb) in vduse_domain_set_map() argument 70 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in vduse_domain_set_map() 90 struct vhost_iotlb *iotlb) in vduse_domain_clear_map() argument 96 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in vduse_domain_clear_map() 198 map = vhost_iotlb_itree_first(domain->iotlb, start, last); in vduse_domain_get_coherent_page() 468 map = vhost_iotlb_itree_first(domain->iotlb, (u64)dma_addr, in vduse_domain_free_coherent() 478 vhost_iotlb_map_free(domain->iotlb, map); in vduse_domain_free_coherent() [all …]
|
D | iova_domain.h | 34 struct vhost_iotlb *iotlb; member 42 struct vhost_iotlb *iotlb); 45 struct vhost_iotlb *iotlb);
|
D | vduse_dev.c | 747 struct vhost_iotlb *iotlb) in vduse_vdpa_set_map() argument 752 ret = vduse_domain_set_map(dev->domain, iotlb); in vduse_vdpa_set_map() 758 vduse_domain_clear_map(dev->domain, iotlb); in vduse_vdpa_set_map() 1140 map = vhost_iotlb_itree_first(dev->domain->iotlb, in vduse_dev_ioctl() 1349 map = vhost_iotlb_itree_first(dev->domain->iotlb, in vduse_dev_ioctl()
|
/linux-6.6.21/include/uapi/linux/ |
D | vhost_types.h | 99 struct vhost_iotlb_msg iotlb; member 108 struct vhost_iotlb_msg iotlb; member
|
/linux-6.6.21/drivers/vdpa/vdpa_sim/ |
D | vdpa_sim.c | 607 struct vhost_iotlb *iotlb) in vdpasim_set_map() argument 624 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in vdpasim_set_map()
|
/linux-6.6.21/drivers/vdpa/mlx5/net/ |
D | mlx5_vnet.c | 2676 struct vhost_iotlb *iotlb, unsigned int asid) in mlx5_vdpa_change_map() argument 2688 err = mlx5_vdpa_create_mr(mvdev, iotlb, asid); in mlx5_vdpa_change_map() 2924 static int set_map_data(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, in set_map_data() argument 2930 err = mlx5_vdpa_handle_set_map(mvdev, iotlb, &change_map, asid); in set_map_data() 2937 err = mlx5_vdpa_change_map(mvdev, iotlb, asid); in set_map_data() 2943 struct vhost_iotlb *iotlb) in mlx5_vdpa_set_map() argument 2950 err = set_map_data(mvdev, iotlb, asid); in mlx5_vdpa_set_map()
|
/linux-6.6.21/Documentation/userspace-api/ |
D | vduse.rst | 213 * the iotlb mapping. The munmap(2) should be called for the
|