Home
last modified time | relevance | path

Searched refs:iotlb (Results 1 – 19 of 19) sorted by relevance

/linux-6.1.9/drivers/vhost/
Diotlb.c28 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 …]
Dvdpa.c41 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()
702 static void vhost_vdpa_pa_unmap(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, in vhost_vdpa_pa_unmap() argument
710 while ((map = vhost_iotlb_itree_first(iotlb, start, last)) != NULL) { in vhost_vdpa_pa_unmap()
[all …]
Dvhost.c331 vq->iotlb = NULL; in vhost_vq_reset()
474 dev->iotlb = NULL; in vhost_dev_init()
703 vhost_iotlb_free(dev->iotlb); in vhost_dev_cleanup()
704 dev->iotlb = NULL; in vhost_dev_cleanup()
814 if (!vq->iotlb) in vhost_copy_to_user()
849 if (!vq->iotlb) in vhost_copy_from_user()
930 if (!vq->iotlb) { \
975 if (!vq->iotlb) { \
1055 struct vhost_iotlb_msg *vq_msg = &node->msg.iotlb; in vhost_iotlb_notify_vq()
1097 if (!dev->iotlb) { in vhost_process_iotlb_msg()
[all …]
Dvhost.h116 struct vhost_iotlb *iotlb; member
153 struct vhost_iotlb *iotlb; member
177 void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_iotlb *iotlb);
226 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb,
DMakefile19 vhost_iotlb-y := iotlb.o
Dvringh.c1103 struct vhost_iotlb *iotlb = vrh->iotlb; in iotlb_translate() local
1117 map = vhost_iotlb_itree_first(iotlb, addr, last); in iotlb_translate()
1333 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb, in vringh_set_iotlb() argument
1336 vrh->iotlb = iotlb; in vringh_set_iotlb()
/linux-6.1.9/include/linux/
Dvhost_iotlb.h33 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,
Dvringh.h48 struct vhost_iotlb *iotlb; member
278 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb,
Dvdpa.h337 struct vhost_iotlb *iotlb);
/linux-6.1.9/drivers/vdpa/mlx5/core/
Dmr.c224 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
328 err = map_direct_mr(mvdev, dmr, iotlb); in add_direct_chain()
359 static int create_user_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) in create_user_mr() argument
374 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in create_user_mr()
389 err = add_direct_chain(mvdev, ps, pe - ps, pperm, iotlb); in create_user_mr()
398 err = add_direct_chain(mvdev, ps, pe - ps, pperm, iotlb); in create_user_mr()
462 err = vhost_iotlb_add_range(mvdev->cvq.iotlb, start, last, start, VHOST_ACCESS_RW); in dup_iotlb()
[all …]
Dmlx5_vdpa.h52 struct vhost_iotlb *iotlb; member
118 int mlx5_vdpa_handle_set_map(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb,
120 int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb,
Dresources.c232 mvdev->cvq.iotlb = vhost_iotlb_alloc(0, 0); in init_ctrl_vq()
233 if (!mvdev->cvq.iotlb) in init_ctrl_vq()
236 vringh_set_iotlb(&mvdev->cvq.vring, mvdev->cvq.iotlb, &mvdev->cvq.iommu_lock); in init_ctrl_vq()
243 vhost_iotlb_free(mvdev->cvq.iotlb); in cleanup_ctrl_vq()
/linux-6.1.9/drivers/vdpa/vdpa_user/
Diova_domain.c35 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 …]
Diova_domain.h35 struct vhost_iotlb *iotlb; member
43 struct vhost_iotlb *iotlb);
46 struct vhost_iotlb *iotlb);
Dvduse_dev.c713 struct vhost_iotlb *iotlb) in vduse_vdpa_set_map() argument
718 ret = vduse_domain_set_map(dev->domain, iotlb); in vduse_vdpa_set_map()
724 vduse_domain_clear_map(dev->domain, iotlb); in vduse_vdpa_set_map()
1059 map = vhost_iotlb_itree_first(domain->iotlb, in vduse_dev_ioctl()
1254 map = vhost_iotlb_itree_first(domain->iotlb, in vduse_dev_ioctl()
/linux-6.1.9/include/uapi/linux/
Dvhost_types.h83 struct vhost_iotlb_msg iotlb; member
92 struct vhost_iotlb_msg iotlb; member
/linux-6.1.9/drivers/vdpa/vdpa_sim/
Dvdpa_sim.c609 struct vhost_iotlb *iotlb) in vdpasim_set_map() argument
625 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in vdpasim_set_map()
/linux-6.1.9/drivers/vdpa/mlx5/net/
Dmlx5_vnet.c2398 struct vhost_iotlb *iotlb, unsigned int asid) in mlx5_vdpa_change_map() argument
2410 err = mlx5_vdpa_create_mr(mvdev, iotlb, asid); in mlx5_vdpa_change_map()
2627 static int set_map_data(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, in set_map_data() argument
2633 err = mlx5_vdpa_handle_set_map(mvdev, iotlb, &change_map, asid); in set_map_data()
2640 err = mlx5_vdpa_change_map(mvdev, iotlb, asid); in set_map_data()
2646 struct vhost_iotlb *iotlb) in mlx5_vdpa_set_map() argument
2653 err = set_map_data(mvdev, iotlb, asid); in mlx5_vdpa_set_map()
/linux-6.1.9/Documentation/userspace-api/
Dvduse.rst213 * the iotlb mapping. The munmap(2) should be called for the