Home
last modified time | relevance | path

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

/linux-5.19.10/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
68 static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb) in iotlb_to_asid() argument
70 struct vhost_vdpa_as *as = container_of(iotlb, struct in iotlb_to_asid()
71 vhost_vdpa_as, iotlb); in iotlb_to_asid()
94 return &as->iotlb; in asid_to_iotlb()
112 vhost_iotlb_init(&as->iotlb, 0, 0); in vhost_vdpa_alloc_as()
138 vhost_iotlb_reset(&as->iotlb); in vhost_vdpa_remove_as()
655 struct vhost_iotlb *iotlb, in vhost_vdpa_pa_unmap() argument
663 while ((map = vhost_iotlb_itree_first(iotlb, start, last)) != NULL) { in vhost_vdpa_pa_unmap()
673 vhost_iotlb_map_free(iotlb, map); 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.c1102 struct vhost_iotlb *iotlb = vrh->iotlb; in iotlb_translate() local
1116 map = vhost_iotlb_itree_first(iotlb, addr, in iotlb_translate()
1300 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb, in vringh_set_iotlb() argument
1303 vrh->iotlb = iotlb; in vringh_set_iotlb()
/linux-5.19.10/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.h332 struct vhost_iotlb *iotlb);
/linux-5.19.10/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
107 int mlx5_vdpa_handle_set_map(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb,
109 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-5.19.10/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()
394 map = vhost_iotlb_itree_first(domain->iotlb, (u64)dma_addr, in vduse_domain_free_coherent()
404 vhost_iotlb_map_free(domain->iotlb, map); in vduse_domain_free_coherent()
[all …]
Diova_domain.h34 struct vhost_iotlb *iotlb; member
40 struct vhost_iotlb *iotlb);
43 struct vhost_iotlb *iotlb);
Dvduse_dev.c697 struct vhost_iotlb *iotlb) in vduse_vdpa_set_map() argument
702 ret = vduse_domain_set_map(dev->domain, iotlb); in vduse_vdpa_set_map()
708 vduse_domain_clear_map(dev->domain, iotlb); in vduse_vdpa_set_map()
947 map = vhost_iotlb_itree_first(domain->iotlb, in vduse_dev_ioctl()
/linux-5.19.10/include/uapi/linux/
Dvhost_types.h83 struct vhost_iotlb_msg iotlb; member
92 struct vhost_iotlb_msg iotlb; member
/linux-5.19.10/drivers/vdpa/vdpa_sim/
Dvdpa_sim.c588 struct vhost_iotlb *iotlb) in vdpasim_set_map() argument
604 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in vdpasim_set_map()
/linux-5.19.10/Documentation/userspace-api/
Dvduse.rst213 * the iotlb mapping. The munmap(2) should be called for the
/linux-5.19.10/drivers/vdpa/mlx5/net/
Dmlx5_vnet.c2352 static int mlx5_vdpa_change_map(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) in mlx5_vdpa_change_map() argument
2364 err = mlx5_vdpa_create_mr(mvdev, iotlb); in mlx5_vdpa_change_map()
2571 struct vhost_iotlb *iotlb) in mlx5_vdpa_set_map() argument
2580 err = mlx5_vdpa_handle_set_map(mvdev, iotlb, &change_map); in mlx5_vdpa_set_map()
2587 err = mlx5_vdpa_change_map(mvdev, iotlb); in mlx5_vdpa_set_map()