| /linux-6.15/drivers/vhost/ |
| H A D | iotlb.c | 34 iotlb->nmaps--; in vhost_iotlb_map_free() 75 if (iotlb->limit && in vhost_iotlb_add_range_ctx() 76 iotlb->nmaps == iotlb->limit && in vhost_iotlb_add_range_ctx() 93 iotlb->nmaps++; in vhost_iotlb_add_range_ctx() 138 iotlb->limit = limit; in vhost_iotlb_init() 139 iotlb->nmaps = 0; in vhost_iotlb_init() 154 struct vhost_iotlb *iotlb = kzalloc(sizeof(*iotlb), GFP_KERNEL); in vhost_iotlb_alloc() local 156 if (!iotlb) in vhost_iotlb_alloc() 161 return iotlb; in vhost_iotlb_alloc() 181 if (iotlb) { in vhost_iotlb_free() [all …]
|
| H A D | vdpa.c | 41 struct vhost_iotlb iotlb; member 76 vhost_vdpa_as, iotlb); in iotlb_to_asid() 99 return &as->iotlb; in asid_to_iotlb() 117 vhost_iotlb_init(&as->iotlb, 0, 0); in vhost_vdpa_alloc_as() 998 u32 asid = iotlb_to_asid(iotlb); in vhost_vdpa_map() 1028 struct vhost_iotlb *iotlb, in vhost_vdpa_unmap() argument 1033 u32 asid = iotlb_to_asid(iotlb); in vhost_vdpa_unmap() 1045 struct vhost_iotlb *iotlb, in vhost_vdpa_va_map() argument 1268 iotlb = &as->iotlb; in vhost_vdpa_process_iotlb_msg() 1270 iotlb = asid_to_iotlb(v, asid); in vhost_vdpa_process_iotlb_msg() [all …]
|
| H A D | vhost.c | 385 vq->iotlb = NULL; in vhost_vq_reset() 548 dev->iotlb = NULL; in vhost_dev_init() 1153 if (!vq->iotlb) in vhost_copy_to_user() 1188 if (!vq->iotlb) in vhost_copy_from_user() 1681 if (vq->iotlb) in vq_access_ok() 1738 if (!vq->iotlb) in vq_meta_prefetch() 1766 if (vq->iotlb) in vq_log_used_access_ok() 2289 if (!vq->iotlb) in log_used() 2315 if (vq->iotlb) { in vhost_log_write() 2394 if (!vq->iotlb && in vhost_vq_init_access() [all …]
|
| H A D | vhost.h | 134 struct vhost_iotlb *iotlb; member 169 struct vhost_iotlb *iotlb; member 193 void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_iotlb *iotlb); 247 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb,
|
| H A D | Makefile | 19 vhost_iotlb-y := iotlb.o
|
| H A 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.15/include/linux/ |
| H A 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,
|
| H A D | vringh.h | 51 struct vhost_iotlb *iotlb; member 294 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb,
|
| H A D | vdpa.h | 431 struct vhost_iotlb *iotlb);
|
| /linux-6.15/drivers/vdpa/mlx5/core/ |
| H A D | mr.c | 368 struct vhost_iotlb *iotlb) in map_direct_mr() argument 500 struct vhost_iotlb *iotlb) in create_user_mr() argument 652 vhost_iotlb_free(mr->iotlb); in _mlx5_vdpa_destroy_mr() 776 struct vhost_iotlb *iotlb) in _mlx5_vdpa_create_mr() argument 780 if (iotlb) in _mlx5_vdpa_create_mr() 789 if (!mr->iotlb) { in _mlx5_vdpa_create_mr() 794 err = dup_iotlb(mr->iotlb, iotlb); in _mlx5_vdpa_create_mr() 803 vhost_iotlb_free(mr->iotlb); in _mlx5_vdpa_create_mr() 806 if (iotlb) in _mlx5_vdpa_create_mr() 841 struct vhost_iotlb *iotlb, in mlx5_vdpa_update_cvq_iotlb() argument [all …]
|
| H A D | mlx5_vdpa.h | 35 struct vhost_iotlb *iotlb; member 54 struct vhost_iotlb *iotlb; member 150 struct vhost_iotlb *iotlb); 162 struct vhost_iotlb *iotlb,
|
| H A 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.15/drivers/vdpa/vdpa_user/ |
| H A D | iova_domain.c | 35 ret = vhost_iotlb_add_range_ctx(domain->iotlb, start, last, in vduse_iotlb_add_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 202 map = vhost_iotlb_itree_first(domain->iotlb, start, last); in vduse_domain_get_coherent_page() 502 vhost_iotlb_map_free(domain->iotlb, map); in vduse_domain_free_coherent() 557 vhost_iotlb_free(domain->iotlb); in vduse_domain_release() 592 domain->iotlb = vhost_iotlb_alloc(0, 0); in vduse_domain_create() 593 if (!domain->iotlb) in vduse_domain_create() [all …]
|
| H A D | iova_domain.h | 35 struct vhost_iotlb *iotlb; member 43 struct vhost_iotlb *iotlb); 46 struct vhost_iotlb *iotlb);
|
| H A D | vduse_dev.c | 761 struct vhost_iotlb *iotlb) in vduse_vdpa_set_map() argument 766 ret = vduse_domain_set_map(dev->domain, iotlb); in vduse_vdpa_set_map() 772 vduse_domain_clear_map(dev->domain, iotlb); in vduse_vdpa_set_map() 1177 map = vhost_iotlb_itree_first(dev->domain->iotlb, in vduse_dev_ioctl() 1386 map = vhost_iotlb_itree_first(dev->domain->iotlb, in vduse_dev_ioctl()
|
| /linux-6.15/include/uapi/linux/ |
| H A D | vhost_types.h | 99 struct vhost_iotlb_msg iotlb; member 108 struct vhost_iotlb_msg iotlb; member
|
| /linux-6.15/drivers/iommu/iommufd/ |
| H A D | iommufd_test.h | 144 __u32 iotlb; member 207 __u32 iotlb; member
|
| H A D | selftest.c | 139 u32 iotlb[MOCK_NESTED_DOMAIN_IOTLB_NUM]; member 385 IOMMU_HWPT_DATA_SELFTEST, iotlb); in __mock_domain_alloc_nested() 395 mock_nested->iotlb[i] = user_cfg.iotlb; in __mock_domain_alloc_nested() 828 mock_nested->iotlb[j] = 0; in mock_domain_cache_invalidate_user() 830 mock_nested->iotlb[inv.iotlb_id] = 0; in mock_domain_cache_invalidate_user() 1184 u32 iotlb) in iommufd_test_md_check_iotlb() argument 1197 mock_nested->iotlb[iotlb_id] != iotlb) in iommufd_test_md_check_iotlb() 1882 cmd->check_iotlb.iotlb); in iommufd_test()
|
| /linux-6.15/drivers/vdpa/vdpa_sim/ |
| H A D | vdpa_sim.c | 630 struct vhost_iotlb *iotlb) in vdpasim_set_map() argument 647 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in vdpasim_set_map()
|
| /linux-6.15/drivers/vdpa/mlx5/net/ |
| H A D | mlx5_vnet.c | 3335 static int set_map_data(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, in set_map_data() argument 3344 if (vhost_iotlb_itree_first(iotlb, 0, U64_MAX)) { in set_map_data() 3345 new_mr = mlx5_vdpa_create_mr(mvdev, iotlb); in set_map_data() 3366 return mlx5_vdpa_update_cvq_iotlb(mvdev, iotlb, asid); in set_map_data() 3374 struct vhost_iotlb *iotlb) in mlx5_vdpa_set_map() argument 3381 err = set_map_data(mvdev, iotlb, asid); in mlx5_vdpa_set_map() 3647 err = mlx5_vdpa_update_cvq_iotlb(mvdev, mvdev->mres.mr[asid]->iotlb, asid); in mlx5_set_group_asid()
|
| /linux-6.15/Documentation/userspace-api/ |
| H A D | vduse.rst | 213 * the iotlb mapping. The munmap(2) should be called for the
|
| /linux-6.15/tools/testing/selftests/iommu/ |
| H A D | iommufd.c | 431 offsetofend(struct iommu_hwpt_selftest, iotlb); in TEST_F() 433 .iotlb = IOMMU_TEST_IOTLB_DEFAULT, in TEST_F() 2678 .iotlb = IOMMU_TEST_IOTLB_DEFAULT, in FIXTURE_SETUP() 2754 .iotlb = IOMMU_TEST_IOTLB_DEFAULT, in TEST_F() 3067 .iotlb = IOMMU_TEST_IOTLB_DEFAULT, in TEST_F()
|
| H A D | iommufd_fail_nth.c | 625 .iotlb = IOMMU_TEST_IOTLB_DEFAULT, in TEST_FAIL_NTH()
|
| H A D | iommufd_utils.h | 244 .iotlb = expected, \
|