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

/linux-master/drivers/vhost/
H A Diotlb.c25 * @iotlb: the IOTLB
28 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb, argument
31 vhost_iotlb_itree_remove(map, &iotlb->root);
34 iotlb->nmaps--;
40 * @iotlb: the IOTLB
50 int vhost_iotlb_add_range_ctx(struct vhost_iotlb *iotlb, argument
65 int err = vhost_iotlb_add_range_ctx(iotlb, start, mid, addr,
75 if (iotlb->limit &&
76 iotlb->nmaps == iotlb
103 vhost_iotlb_add_range(struct vhost_iotlb *iotlb, u64 start, u64 last, u64 addr, unsigned int perm) argument
118 vhost_iotlb_del_range(struct vhost_iotlb *iotlb, u64 start, u64 last) argument
134 vhost_iotlb_init(struct vhost_iotlb *iotlb, unsigned int limit, unsigned int flags) argument
154 struct vhost_iotlb *iotlb = kzalloc(sizeof(*iotlb), GFP_KERNEL); local
169 vhost_iotlb_reset(struct vhost_iotlb *iotlb) argument
179 vhost_iotlb_free(struct vhost_iotlb *iotlb) argument
195 vhost_iotlb_itree_first(struct vhost_iotlb *iotlb, u64 start, u64 last) argument
[all...]
H A DMakefile19 vhost_iotlb-y := iotlb.o
H A Dvdpa.c41 struct vhost_iotlb iotlb; member in struct:vhost_vdpa_as
70 struct vhost_iotlb *iotlb, u64 start,
73 static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb) argument
75 struct vhost_vdpa_as *as = container_of(iotlb, struct
76 vhost_vdpa_as, iotlb);
99 return &as->iotlb;
117 vhost_iotlb_init(&as->iotlb, 0, 0);
152 vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid);
155 * iotlb to the initial or default state, which cannot be
911 static void vhost_vdpa_pa_unmap(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, argument
934 vhost_vdpa_va_unmap(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, u64 start, u64 last, u32 asid) argument
949 vhost_vdpa_iotlb_unmap(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, u64 start, u64 last, u32 asid) argument
983 vhost_vdpa_map(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, u64 iova, u64 size, u64 pa, u32 perm, void *opaque) argument
1018 vhost_vdpa_unmap(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, u64 iova, u64 size) argument
1035 vhost_vdpa_va_map(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, u64 iova, u64 size, u64 uaddr, u32 perm) argument
1086 vhost_vdpa_pa_map(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, u64 iova, u64 size, u64 uaddr, u32 perm) argument
1211 vhost_vdpa_process_iotlb_update(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, struct vhost_iotlb_msg *msg) argument
1240 struct vhost_iotlb *iotlb = NULL; local
[all...]
H A Dvhost.c43 "Maximum number of iotlb entries. (default: 2048)");
389 vq->iotlb = NULL;
518 dev->iotlb = NULL;
991 vhost_iotlb_free(dev->iotlb);
992 dev->iotlb = NULL;
1097 if (!vq->iotlb)
1100 /* This function should be called after iotlb
1102 * could be access through iotlb. So -EAGAIN should
1132 if (!vq->iotlb)
1135 /* This function should be called after iotlb
[all...]
H A Dvhost.h132 struct vhost_iotlb *iotlb; member in struct:vhost_virtqueue
167 struct vhost_iotlb *iotlb; member in struct:vhost_dev
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 Dvringh.c1120 struct vhost_iotlb *iotlb = vrh->iotlb; local
1136 map = vhost_iotlb_itree_first(iotlb, addr, last);
1448 * @iotlb: iotlb associated with this vring
1449 * @iotlb_lock: spinlock to synchronize the iotlb accesses
1451 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb, argument
1454 vrh->iotlb = iotlb;
/linux-master/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,
H A Dvringh.h51 struct vhost_iotlb *iotlb; member in struct:vringh
294 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb,
H A Dvdpa.h322 * @iotlb: vhost memory mapping to be
431 struct vhost_iotlb *iotlb);
/linux-master/drivers/vdpa/vdpa_user/
H A Diova_domain.h34 struct vhost_iotlb *iotlb; member in struct:vduse_iova_domain
42 struct vhost_iotlb *iotlb);
45 struct vhost_iotlb *iotlb);
H A Diova_domain.c35 ret = vhost_iotlb_add_range_ctx(domain->iotlb, start, last,
51 while ((map = vhost_iotlb_itree_first(domain->iotlb, start, last))) {
55 vhost_iotlb_map_free(domain->iotlb, map);
60 struct vhost_iotlb *iotlb)
70 for (map = vhost_iotlb_itree_first(iotlb, start, last); map;
90 struct vhost_iotlb *iotlb)
96 for (map = vhost_iotlb_itree_first(iotlb, start, last); map;
198 map = vhost_iotlb_itree_first(domain->iotlb, start, last);
489 map = vhost_iotlb_itree_first(domain->iotlb, (u64)dma_addr,
499 vhost_iotlb_map_free(domain->iotlb, ma
59 vduse_domain_set_map(struct vduse_iova_domain *domain, struct vhost_iotlb *iotlb) argument
89 vduse_domain_clear_map(struct vduse_iova_domain *domain, struct vhost_iotlb *iotlb) argument
[all...]
H A Dvduse_dev.c757 struct vhost_iotlb *iotlb)
762 ret = vduse_domain_set_map(dev->domain, iotlb);
768 vduse_domain_clear_map(dev->domain, iotlb);
1173 map = vhost_iotlb_itree_first(dev->domain->iotlb,
1382 map = vhost_iotlb_itree_first(dev->domain->iotlb,
755 vduse_vdpa_set_map(struct vdpa_device *vdpa, unsigned int asid, struct vhost_iotlb *iotlb) argument
/linux-master/drivers/vdpa/mlx5/core/
H A Dmr.c224 struct vhost_iotlb *iotlb)
240 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1);
256 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1);
309 struct vhost_iotlb *iotlb)
330 err = map_direct_mr(mvdev, dmr, iotlb);
354 /* The iotlb pointer contains a list of maps. Go over the maps, possibly
358 * by iotlb.
362 struct vhost_iotlb *iotlb)
376 for (map = vhost_iotlb_itree_first(iotlb, start, last); map;
391 err = add_direct_chain(mvdev, mr, ps, pe - ps, pperm, iotlb);
223 map_direct_mr(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_direct_mr *mr, struct vhost_iotlb *iotlb) argument
304 add_direct_chain(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_mr *mr, u64 start, u64 size, u8 perm, struct vhost_iotlb *iotlb) argument
360 create_user_mr(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_mr *mr, struct vhost_iotlb *iotlb) argument
481 prune_iotlb(struct vhost_iotlb *iotlb) argument
592 _mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_mr *mr, struct vhost_iotlb *iotlb) argument
632 mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) argument
658 mlx5_vdpa_update_cvq_iotlb(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, unsigned int asid) argument
[all...]
H A Dmlx5_vdpa.h35 struct vhost_iotlb *iotlb; member in struct:mlx5_vdpa_mr
54 struct vhost_iotlb *iotlb; member in struct:mlx5_control_vq
123 struct vhost_iotlb *iotlb);
133 struct vhost_iotlb *iotlb,
H A Dresources.c232 mvdev->cvq.iotlb = vhost_iotlb_alloc(0, 0);
233 if (!mvdev->cvq.iotlb)
237 vringh_set_iotlb(&mvdev->cvq.vring, mvdev->cvq.iotlb, &mvdev->cvq.iommu_lock);
244 vhost_iotlb_free(mvdev->cvq.iotlb);
/linux-master/include/uapi/linux/
H A Dvhost_types.h99 struct vhost_iotlb_msg iotlb; member in union:vhost_msg::__anon334
108 struct vhost_iotlb_msg iotlb; member in union:vhost_msg_v2::__anon335
/linux-master/drivers/iommu/iommufd/
H A Diommufd_test.h128 __u32 iotlb; member in struct:iommu_test_cmd::__anon62::__anon76
151 * @iotlb: default mock iotlb value, IOMMU_TEST_IOTLB_DEFAULT
154 __u32 iotlb; member in struct:iommu_hwpt_selftest
165 * @iotlb_id: Invalidate iotlb entry index
H A Dselftest.c131 u32 iotlb[MOCK_NESTED_DOMAIN_IOTLB_NUM]; member in struct:mock_iommu_domain_nested
314 mock_nested->iotlb[i] = user_cfg->iotlb;
359 IOMMU_HWPT_DATA_SELFTEST, iotlb);
584 /* Invalidate all mock iotlb entries and ignore iotlb_id */
586 mock_nested->iotlb[j] = 0;
588 mock_nested->iotlb[inv.iotlb_id] = 0;
914 u32 iotlb)
928 mock_nested->iotlb[iotlb_id] != iotlb)
912 iommufd_test_md_check_iotlb(struct iommufd_ucmd *ucmd, u32 mockpt_id, unsigned int iotlb_id, u32 iotlb) argument
[all...]
/linux-master/drivers/vdpa/vdpa_sim/
H A Dvdpa_sim.c37 "Maximum number of iotlb entries for each address space. 0 means unlimited. (default: 2048)");
630 struct vhost_iotlb *iotlb)
647 for (map = vhost_iotlb_itree_first(iotlb, start, last); map;
629 vdpasim_set_map(struct vdpa_device *vdpa, unsigned int asid, struct vhost_iotlb *iotlb) argument
/linux-master/drivers/vdpa/mlx5/net/
H A Dmlx5_vnet.c3100 static int set_map_data(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, argument
3109 if (vhost_iotlb_itree_first(iotlb, 0, U64_MAX)) {
3110 new_mr = mlx5_vdpa_create_mr(mvdev, iotlb);
3131 return mlx5_vdpa_update_cvq_iotlb(mvdev, iotlb, asid);
3139 struct vhost_iotlb *iotlb)
3146 err = set_map_data(mvdev, iotlb, asid);
3411 err = mlx5_vdpa_update_cvq_iotlb(mvdev, mvdev->mr[asid]->iotlb, asid);
3138 mlx5_vdpa_set_map(struct vdpa_device *vdev, unsigned int asid, struct vhost_iotlb *iotlb) argument
/linux-master/tools/testing/selftests/iommu/
H A Diommufd_utils.h206 .iotlb = expected, \
H A Diommufd.c272 offsetofend(struct iommu_hwpt_selftest, iotlb);
274 .iotlb = IOMMU_TEST_IOTLB_DEFAULT,
419 * Invalidate the 1st iotlb entry but fail the 2nd request
440 * Invalidate the 1st iotlb entry but fail the 2nd request
460 /* Invalidate the 2nd iotlb entry and verify */
475 /* Invalidate the 3rd and 4th iotlb entries and verify */
487 /* Invalidate all iotlb entries for nested_hwpt_id[1] and verify */

Completed in 216 milliseconds