Home
last modified time | relevance | path

Searched refs:iotlb (Results 1 - 25 of 35) sorted by relevance

12

/kernel/linux/linux-5.10/drivers/vhost/
H A Diotlb.c25 * @iotlb: the IOTLB
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()
40 * @iotlb: the IOTLB
49 int vhost_iotlb_add_range(struct vhost_iotlb *iotlb, in vhost_iotlb_add_range() argument
58 if (iotlb->limit && in vhost_iotlb_add_range()
59 iotlb->nmaps == iotlb->limit && in vhost_iotlb_add_range()
60 iotlb in vhost_iotlb_add_range()
91 vhost_iotlb_del_range(struct vhost_iotlb *iotlb, u64 start, u64 last) vhost_iotlb_del_range() argument
110 struct vhost_iotlb *iotlb = kzalloc(sizeof(*iotlb), GFP_KERNEL); vhost_iotlb_alloc() local
129 vhost_iotlb_reset(struct vhost_iotlb *iotlb) vhost_iotlb_reset() argument
139 vhost_iotlb_free(struct vhost_iotlb *iotlb) vhost_iotlb_free() argument
155 vhost_iotlb_itree_first(struct vhost_iotlb *iotlb, u64 start, u64 last) vhost_iotlb_itree_first() argument
[all...]
H A Dvhost.c43 "Maximum number of iotlb entries. (default: 2048)");
339 vq->iotlb = NULL; in vhost_vq_reset()
482 dev->iotlb = NULL; in vhost_dev_init()
712 vhost_iotlb_free(dev->iotlb); in vhost_dev_cleanup()
713 dev->iotlb = NULL; in vhost_dev_cleanup()
823 if (!vq->iotlb) in vhost_copy_to_user()
826 /* This function should be called after iotlb in vhost_copy_to_user()
828 * could be access through iotlb. So -EAGAIN should in vhost_copy_to_user()
858 if (!vq->iotlb) in vhost_copy_from_user()
861 /* This function should be called after iotlb in vhost_copy_from_user()
[all...]
H A Dvdpa.c516 struct vhost_iotlb *iotlb = dev->iotlb; in vhost_vdpa_iotlb_unmap() local
521 while ((map = vhost_iotlb_itree_first(iotlb, start, last)) != NULL) { in vhost_vdpa_iotlb_unmap()
531 vhost_iotlb_map_free(iotlb, map); in vhost_vdpa_iotlb_unmap()
540 kfree(dev->iotlb); in vhost_vdpa_iotlb_free()
541 dev->iotlb = NULL; in vhost_vdpa_iotlb_free()
574 r = vhost_iotlb_add_range(dev->iotlb, iova, iova + size - 1, in vhost_vdpa_map()
583 r = ops->set_map(vdpa, dev->iotlb); in vhost_vdpa_map()
590 vhost_iotlb_del_range(dev->iotlb, iova, iova + size - 1); in vhost_vdpa_map()
609 ops->set_map(vdpa, dev->iotlb); in vhost_vdpa_unmap()
619 struct vhost_iotlb *iotlb = dev->iotlb; vhost_vdpa_process_iotlb_update() local
[all...]
H A Dvhost.h122 struct vhost_iotlb *iotlb; member
159 struct vhost_iotlb *iotlb; member
183 void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_iotlb *iotlb);
233 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb,
H A DMakefile19 vhost_iotlb-y := iotlb.o
/kernel/linux/linux-6.6/drivers/vhost/
H A Diotlb.c25 * @iotlb: the IOTLB
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()
40 * @iotlb: the IOTLB
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 in vhost_iotlb_add_range_ctx()
103 vhost_iotlb_add_range(struct vhost_iotlb *iotlb, u64 start, u64 last, u64 addr, unsigned int perm) vhost_iotlb_add_range() argument
118 vhost_iotlb_del_range(struct vhost_iotlb *iotlb, u64 start, u64 last) vhost_iotlb_del_range() argument
134 vhost_iotlb_init(struct vhost_iotlb *iotlb, unsigned int limit, unsigned int flags) vhost_iotlb_init() argument
154 struct vhost_iotlb *iotlb = kzalloc(sizeof(*iotlb), GFP_KERNEL); vhost_iotlb_alloc() local
169 vhost_iotlb_reset(struct vhost_iotlb *iotlb) vhost_iotlb_reset() argument
179 vhost_iotlb_free(struct vhost_iotlb *iotlb) vhost_iotlb_free() argument
195 vhost_iotlb_itree_first(struct vhost_iotlb *iotlb, u64 start, u64 last) vhost_iotlb_itree_first() argument
[all...]
H A 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()
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, star in vhost_vdpa_pa_unmap()
831 vhost_vdpa_va_unmap(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, u64 start, u64 last, u32 asid) vhost_vdpa_va_unmap() argument
846 vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, u64 start, u64 last, u32 asid) vhost_vdpa_iotlb_unmap() argument
880 vhost_vdpa_map(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, u64 iova, u64 size, u64 pa, u32 perm, void *opaque) vhost_vdpa_map() argument
914 vhost_vdpa_unmap(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, u64 iova, u64 size) vhost_vdpa_unmap() argument
931 vhost_vdpa_va_map(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, u64 iova, u64 size, u64 uaddr, u32 perm) vhost_vdpa_va_map() argument
982 vhost_vdpa_pa_map(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, u64 iova, u64 size, u64 uaddr, u32 perm) vhost_vdpa_pa_map() argument
1107 vhost_vdpa_process_iotlb_update(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, struct vhost_iotlb_msg *msg) vhost_vdpa_process_iotlb_update() argument
1136 struct vhost_iotlb *iotlb = NULL; vhost_vdpa_process_iotlb_msg() local
[all...]
H A Dvhost.c43 "Maximum number of iotlb entries. (default: 2048)");
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()
1100 /* This function should be called after iotlb in vhost_copy_to_user()
1102 * could be access through iotlb. So -EAGAIN should in vhost_copy_to_user()
1132 if (!vq->iotlb) in vhost_copy_from_user()
1135 /* This function should be called after iotlb in vhost_copy_from_user()
[all...]
H A Dvhost.h132 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,
H A DMakefile19 vhost_iotlb-y := iotlb.o
/kernel/linux/linux-6.6/include/linux/
H A 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,
/kernel/linux/linux-5.10/include/linux/
H A Dvhost_iotlb.h32 int vhost_iotlb_add_range(struct vhost_iotlb *iotlb, u64 start, u64 last,
34 void vhost_iotlb_del_range(struct vhost_iotlb *iotlb, u64 start, u64 last);
37 void vhost_iotlb_free(struct vhost_iotlb *iotlb);
38 void vhost_iotlb_reset(struct vhost_iotlb *iotlb);
41 vhost_iotlb_itree_first(struct vhost_iotlb *iotlb, u64 start, u64 last);
45 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb,
H A Dvringh.h47 struct vhost_iotlb *iotlb; member
261 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb);
/kernel/linux/linux-6.6/drivers/vdpa/mlx5/core/
H A Dmr.c224 struct vhost_iotlb *iotlb) in map_direct_mr()
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()
327 err = map_direct_mr(mvdev, dmr, iotlb); in add_direct_chain()
351 /* The iotlb pointer contains a list of maps. Go over the maps, possibly
355 * by iotlb.
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()
223 map_direct_mr(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_direct_mr *mr, struct vhost_iotlb *iotlb) map_direct_mr() argument
304 add_direct_chain(struct mlx5_vdpa_dev *mvdev, u64 start, u64 size, u8 perm, struct vhost_iotlb *iotlb) add_direct_chain() argument
536 _mlx5_vdpa_create_cvq_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, unsigned int asid) _mlx5_vdpa_create_cvq_mr() argument
546 _mlx5_vdpa_create_dvq_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, unsigned int asid) _mlx5_vdpa_create_dvq_mr() argument
572 _mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, unsigned int asid) _mlx5_vdpa_create_mr() argument
593 mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, unsigned int asid) mlx5_vdpa_create_mr() argument
604 mlx5_vdpa_handle_set_map(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, bool *change_map, unsigned int asid) mlx5_vdpa_handle_set_map() argument
[all...]
H A Dmlx5_vdpa.h53 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,
H A Dresources.c232 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()
/kernel/linux/linux-6.6/drivers/vdpa/vdpa_user/
H A 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()
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()
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, ma in vduse_domain_free_coherent()
59 vduse_domain_set_map(struct vduse_iova_domain *domain, struct vhost_iotlb *iotlb) vduse_domain_set_map() argument
89 vduse_domain_clear_map(struct vduse_iova_domain *domain, struct vhost_iotlb *iotlb) vduse_domain_clear_map() argument
[all...]
H A Diova_domain.h34 struct vhost_iotlb *iotlb; member
42 struct vhost_iotlb *iotlb);
45 struct vhost_iotlb *iotlb);
/kernel/linux/linux-5.10/drivers/vdpa/mlx5/core/
H A Dmr.c223 struct vhost_iotlb *iotlb) in map_direct_mr()
239 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1); in map_direct_mr()
255 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1); in map_direct_mr()
304 struct vhost_iotlb *iotlb) in add_direct_chain()
327 err = map_direct_mr(mvdev, dmr, iotlb); in add_direct_chain()
352 /* The iotlb pointer contains a list of maps. Go over the maps, possibly
356 * by iotlb.
358 static int _mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) in _mlx5_vdpa_create_mr() argument
376 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in _mlx5_vdpa_create_mr()
391 err = add_direct_chain(mvdev, ps, pe - ps, pperm, iotlb); in _mlx5_vdpa_create_mr()
222 map_direct_mr(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_direct_mr *mr, struct vhost_iotlb *iotlb) map_direct_mr() argument
303 add_direct_chain(struct mlx5_vdpa_dev *mvdev, u64 start, u64 size, u8 perm, struct vhost_iotlb *iotlb) add_direct_chain() argument
424 mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) mlx5_vdpa_create_mr() argument
456 mlx5_vdpa_handle_set_map(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, bool *change_map) mlx5_vdpa_handle_set_map() argument
[all...]
H A Dmlx5_vdpa.h79 int mlx5_vdpa_handle_set_map(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb,
81 int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb);
/kernel/linux/linux-5.10/include/uapi/linux/
H A Dvhost_types.h83 struct vhost_iotlb_msg iotlb; member
92 struct vhost_iotlb_msg iotlb; member
/kernel/linux/patches/linux-6.6/prebuilts/usr/include/linux/
H A Dvhost_types.h63 struct vhost_iotlb_msg iotlb; member
71 struct vhost_iotlb_msg iotlb; member
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/linux/
H A Dvhost_types.h63 struct vhost_iotlb_msg iotlb; member
71 struct vhost_iotlb_msg iotlb; member
/kernel/linux/linux-6.6/include/uapi/linux/
H A Dvhost_types.h99 struct vhost_iotlb_msg iotlb; member
108 struct vhost_iotlb_msg iotlb; member
/kernel/linux/patches/linux-4.19/prebuilts/usr/include/linux/
H A Dvhost.h57 struct vhost_iotlb_msg iotlb; member
65 struct vhost_iotlb_msg iotlb; member

Completed in 17 milliseconds

12