| /linux/drivers/vhost/ |
| H A D | iotlb.c | 23 static void vhost_iotlb_map_unlink(struct vhost_iotlb *iotlb, in vhost_iotlb_map_unlink() argument 26 vhost_iotlb_itree_remove(map, &iotlb->root); in vhost_iotlb_map_unlink() 28 iotlb->nmaps--; in vhost_iotlb_map_unlink() 36 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb, in vhost_iotlb_map_free() argument 39 vhost_iotlb_map_unlink(iotlb, map); in vhost_iotlb_map_free() 56 int vhost_iotlb_add_range_ctx(struct vhost_iotlb *iotlb, in vhost_iotlb_add_range_ctx() argument 66 if (!iotlb->limit) in vhost_iotlb_add_range_ctx() 76 if (iotlb->limit < 2) in vhost_iotlb_add_range_ctx() 79 if (!(iotlb->flags & VHOST_IOTLB_FLAG_RETIRE) && in vhost_iotlb_add_range_ctx() 80 iotlb->nmaps > iotlb->limit - 2) in vhost_iotlb_add_range_ctx() [all …]
|
| H A D | vdpa.c | 46 struct vhost_iotlb iotlb; member 75 struct vhost_iotlb *iotlb, u64 start, 78 static inline u32 iotlb_to_asid(struct vhost_iotlb *iotlb) in iotlb_to_asid() argument 80 struct vhost_vdpa_as *as = container_of(iotlb, struct in iotlb_to_asid() 81 vhost_vdpa_as, iotlb); in iotlb_to_asid() 104 return &as->iotlb; in asid_to_iotlb() 124 vhost_iotlb_init(&as->iotlb, max_iotlb_entries, 0); in vhost_vdpa_alloc_as() 159 vhost_vdpa_iotlb_unmap(v, &as->iotlb, 0ULL, 0ULL - 1, asid); in vhost_vdpa_remove_as() 927 static void vhost_vdpa_pa_unmap(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, in vhost_vdpa_pa_unmap() argument 935 while ((map = vhost_iotlb_itree_first(iotlb, start, last)) != NULL) { in vhost_vdpa_pa_unmap() [all …]
|
| H A D | vhost.c | 394 vq->iotlb = NULL; in vhost_vq_reset() 595 dev->iotlb = NULL; in vhost_dev_init() 1223 vhost_iotlb_free(dev->iotlb); in vhost_dev_cleanup() 1224 dev->iotlb = NULL; in vhost_dev_cleanup() 1329 if (!vq->iotlb) in vhost_copy_to_user() 1364 if (!vq->iotlb) in vhost_copy_from_user() 1445 if (!vq->iotlb) { \ 1490 if (!vq->iotlb) { \ 1599 struct vhost_iotlb_msg *vq_msg = &node->msg.iotlb; in vhost_iotlb_notify_vq() 1641 if (!dev->iotlb) { in vhost_process_iotlb_msg() [all …]
|
| H A D | Makefile | 19 vhost_iotlb-y := iotlb.o
|
| H A D | vringh.c | 1044 struct vhost_iotlb *iotlb = vrh->iotlb; in iotlb_translate() local 1060 map = vhost_iotlb_itree_first(iotlb, addr, last); in iotlb_translate() 1375 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb, in vringh_set_iotlb() argument 1378 vrh->iotlb = iotlb; in vringh_set_iotlb()
|
| H A D | scsi.c | 412 WARN_ON_ONCE(unlikely(vq->iotlb)); in vhost_scsi_log_write()
|
| /linux/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 287 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb,
|
| /linux/drivers/vdpa/mlx5/core/ |
| H A D | mr.c | 368 struct vhost_iotlb *iotlb) in map_direct_mr() argument 383 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1); in map_direct_mr() 398 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1); in map_direct_mr() 447 struct vhost_iotlb *iotlb) in add_direct_chain() argument 468 err = map_direct_mr(mvdev, dmr, iotlb); in add_direct_chain() 500 struct vhost_iotlb *iotlb) in create_user_mr() argument 514 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in create_user_mr() 529 err = add_direct_chain(mvdev, mr, ps, pe - ps, pperm, iotlb); in create_user_mr() 538 err = add_direct_chain(mvdev, mr, ps, pe - ps, pperm, iotlb); in create_user_mr() 623 static void prune_iotlb(struct vhost_iotlb *iotlb) in prune_iotlb() argument [all …]
|
| H A D | mlx5_vdpa.h | 37 struct vhost_iotlb *iotlb; member 56 struct vhost_iotlb *iotlb; member 152 struct vhost_iotlb *iotlb); 164 struct vhost_iotlb *iotlb,
|
| H A D | resources.c | 241 mvdev->cvq.iotlb = vhost_iotlb_alloc(mlx5_vdpa_max_iotlb_entries, 0); in init_ctrl_vq() 242 if (!mvdev->cvq.iotlb) in init_ctrl_vq() 246 vringh_set_iotlb(&mvdev->cvq.vring, mvdev->cvq.iotlb, &mvdev->cvq.iommu_lock); in init_ctrl_vq() 253 vhost_iotlb_free(mvdev->cvq.iotlb); in cleanup_ctrl_vq()
|
| /linux/drivers/vdpa/vdpa_user/ |
| H A D | iova_domain.c | 41 ret = vhost_iotlb_add_range_ctx(domain->iotlb, start, last, in vduse_iotlb_add_range() 57 while ((map = vhost_iotlb_itree_first(domain->iotlb, start, last))) { in vduse_iotlb_del_range() 61 vhost_iotlb_map_free(domain->iotlb, map); in vduse_iotlb_del_range() 66 struct vhost_iotlb *iotlb) in vduse_domain_set_map() argument 76 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in vduse_domain_set_map() 96 struct vhost_iotlb *iotlb) in vduse_domain_clear_map() argument 102 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in vduse_domain_clear_map() 233 map = vhost_iotlb_itree_first(domain->iotlb, start, last); in vduse_domain_get_coherent_page() 537 map = vhost_iotlb_itree_first(domain->iotlb, (u64)dma_addr, in vduse_domain_free_coherent() 546 vhost_iotlb_map_free(domain->iotlb, map); in vduse_domain_free_coherent() [all …]
|
| H A D | vduse_dev.c | 920 struct vhost_iotlb *iotlb) in vduse_vdpa_set_map() argument 925 ret = vduse_domain_set_map(dev->as[asid].domain, iotlb); in vduse_vdpa_set_map() 931 vduse_domain_clear_map(dev->as[asid].domain, iotlb); in vduse_vdpa_set_map() 1447 map = vhost_iotlb_itree_first(dev->as[asid].domain->iotlb, in vduse_dev_iotlb_entry()
|
| /linux/include/uapi/linux/ |
| H A D | vhost_types.h | 99 struct vhost_iotlb_msg iotlb; member 108 struct vhost_iotlb_msg iotlb; member
|
| /linux/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/drivers/vdpa/mlx5/net/ |
| H A D | mlx5_vnet.c | 3355 static int set_map_data(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, in set_map_data() argument 3364 if (vhost_iotlb_itree_first(iotlb, 0, U64_MAX)) { in set_map_data() 3365 new_mr = mlx5_vdpa_create_mr(mvdev, iotlb); in set_map_data() 3386 return mlx5_vdpa_update_cvq_iotlb(mvdev, iotlb, asid); in set_map_data() 3390 struct vhost_iotlb *iotlb) in mlx5_vdpa_set_map() argument 3397 err = set_map_data(mvdev, iotlb, asid); in mlx5_vdpa_set_map() 3665 err = mlx5_vdpa_update_cvq_iotlb(mvdev, mvdev->mres.mr[asid]->iotlb, asid); in mlx5_set_group_asid()
|
| /linux/tools/testing/selftests/iommu/ |
| H A D | iommufd_fail_nth.c | 625 .iotlb = IOMMU_TEST_IOTLB_DEFAULT, in TEST_FAIL_NTH()
|
| H A D | iommufd.c | 430 offsetofend(struct iommu_hwpt_selftest, iotlb); in TEST_F() 432 .iotlb = IOMMU_TEST_IOTLB_DEFAULT, in TEST_F() 608 * Invalidate the 1st iotlb entry but fail the 2nd request in TEST_F() 629 * Invalidate the 1st iotlb entry but fail the 2nd request in TEST_F() 649 /* Invalidate the 2nd iotlb entry and verify */ in TEST_F() 664 /* Invalidate the 3rd and 4th iotlb entries and verify */ in TEST_F() 676 /* Invalidate all iotlb entries for nested_hwpt_id[1] and verify */ in TEST_F() 2840 .iotlb = IOMMU_TEST_IOTLB_DEFAULT, 2919 .iotlb = IOMMU_TEST_IOTLB_DEFAULT, in TEST_F() 3360 .iotlb in TEST_F() [all...] |
| H A D | iommufd_utils.h | 265 .iotlb = expected, \
|