Home
last modified time | relevance | path

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

/linux/drivers/vhost/
H A 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 …]
H A Dvdpa.c41 struct vhost_iotlb iotlb; member
70 struct vhost_iotlb *iotlb, u64 start,
73 static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb) in iotlb_to_asid() argument
75 struct vhost_vdpa_as *as = container_of(iotlb, struct in iotlb_to_asid()
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()
152 vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid); in vhost_vdpa_remove_as()
920 static void vhost_vdpa_pa_unmap(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, in vhost_vdpa_pa_unmap() argument
928 while ((map = vhost_iotlb_itree_first(iotlb, start, last)) != NULL) { in vhost_vdpa_pa_unmap()
[all …]
H A Dvhost.c385 vq->iotlb = NULL; in vhost_vq_reset()
548 dev->iotlb = NULL; in vhost_dev_init()
1047 vhost_iotlb_free(dev->iotlb); in vhost_dev_cleanup()
1048 dev->iotlb = NULL; in vhost_dev_cleanup()
1153 if (!vq->iotlb) in vhost_copy_to_user()
1188 if (!vq->iotlb) in vhost_copy_from_user()
1269 if (!vq->iotlb) { \
1314 if (!vq->iotlb) { \
1420 struct vhost_iotlb_msg *vq_msg = &node->msg.iotlb; in vhost_iotlb_notify_vq()
1462 if (!dev->iotlb) { in vhost_process_iotlb_msg()
[all …]
H A DMakefile19 vhost_iotlb-y := iotlb.o
H A Dvringh.c1120 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/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
294 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb,
H A Dvdpa.h431 struct vhost_iotlb *iotlb);
/linux/drivers/vdpa/mlx5/core/
H A Dmr.c365 struct vhost_iotlb *iotlb) in map_direct_mr() argument
381 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1); in map_direct_mr()
397 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1); in map_direct_mr()
444 struct vhost_iotlb *iotlb) in add_direct_chain() argument
465 err = map_direct_mr(mvdev, dmr, iotlb); in add_direct_chain()
497 struct vhost_iotlb *iotlb) in create_user_mr() argument
511 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in create_user_mr()
526 err = add_direct_chain(mvdev, mr, ps, pe - ps, pperm, iotlb); in create_user_mr()
535 err = add_direct_chain(mvdev, mr, ps, pe - ps, pperm, iotlb); in create_user_mr()
620 static void prune_iotlb(struct vhost_iotlb *iotlb) in prune_iotlb() argument
[all …]
H A Dmlx5_vdpa.h35 struct vhost_iotlb *iotlb; member
54 struct vhost_iotlb *iotlb; member
150 struct vhost_iotlb *iotlb);
162 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()
/linux/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() 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()
202 map = vhost_iotlb_itree_first(domain->iotlb, start, last); in vduse_domain_get_coherent_page()
492 map = vhost_iotlb_itree_first(domain->iotlb, (u64)dma_addr, in vduse_domain_free_coherent()
502 vhost_iotlb_map_free(domain->iotlb, map); in vduse_domain_free_coherent()
[all …]
H A Diova_domain.h35 struct vhost_iotlb *iotlb; member
43 struct vhost_iotlb *iotlb);
46 struct vhost_iotlb *iotlb);
/linux/include/uapi/linux/
H A Dvhost_types.h99 struct vhost_iotlb_msg iotlb; member
108 struct vhost_iotlb_msg iotlb; member
/linux/drivers/iommu/iommufd/
H A Diommufd_test.h129 __u32 iotlb; member
162 __u32 iotlb; member
H A Dselftest.c132 u32 iotlb[MOCK_NESTED_DOMAIN_IOTLB_NUM]; member
315 mock_nested->iotlb[i] = user_cfg->iotlb; in __mock_domain_alloc_nested()
360 IOMMU_HWPT_DATA_SELFTEST, iotlb); in mock_domain_alloc_user()
616 mock_nested->iotlb[j] = 0; in mock_domain_cache_invalidate_user()
618 mock_nested->iotlb[inv.iotlb_id] = 0; in mock_domain_cache_invalidate_user()
944 u32 iotlb) in iommufd_test_md_check_iotlb() argument
958 mock_nested->iotlb[iotlb_id] != iotlb) in iommufd_test_md_check_iotlb()
1472 cmd->check_iotlb.iotlb); in iommufd_test()
/linux/drivers/vdpa/vdpa_sim/
H A Dvdpa_sim.c630 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/drivers/vdpa/mlx5/net/
H A Dmlx5_vnet.c3335 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/Documentation/userspace-api/
H A Dvduse.rst213 * the iotlb mapping. The munmap(2) should be called for the
/linux/tools/testing/selftests/iommu/
H A Diommufd_utils.h221 .iotlb = expected, \
H A Diommufd.c272 offsetofend(struct iommu_hwpt_selftest, iotlb); in TEST_F()
274 .iotlb = IOMMU_TEST_IOTLB_DEFAULT, in TEST_F()