Home
last modified time | relevance | path

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

/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.c526 struct vhost_iotlb *iotlb = dev->iotlb; in vhost_vdpa_pa_unmap() local
531 while ((map = vhost_iotlb_itree_first(iotlb, start, last)) != NULL) { in vhost_vdpa_pa_unmap()
541 vhost_iotlb_map_free(iotlb, map); in vhost_vdpa_pa_unmap()
548 struct vhost_iotlb *iotlb = dev->iotlb; in vhost_vdpa_va_unmap() local
552 while ((map = vhost_iotlb_itree_first(iotlb, start, last)) != NULL) { in vhost_vdpa_va_unmap()
556 vhost_iotlb_map_free(iotlb, map); in vhost_vdpa_va_unmap()
575 kfree(dev->iotlb); in vhost_vdpa_iotlb_free()
576 dev->iotlb = NULL; in vhost_vdpa_iotlb_free()
609 r = vhost_iotlb_add_range_ctx(dev->iotlb, iova, iova + size - 1, in vhost_vdpa_map()
618 r = ops->set_map(vdpa, dev->iotlb); in vhost_vdpa_map()
[all …]
Dvhost.c339 vq->iotlb = NULL; in vhost_vq_reset()
482 dev->iotlb = NULL; in vhost_dev_init()
712 vhost_iotlb_free(dev->iotlb); in vhost_dev_cleanup()
713 dev->iotlb = NULL; in vhost_dev_cleanup()
823 if (!vq->iotlb) in vhost_copy_to_user()
858 if (!vq->iotlb) in vhost_copy_from_user()
939 if (!vq->iotlb) { \
984 if (!vq->iotlb) { \
1064 struct vhost_iotlb_msg *vq_msg = &node->msg.iotlb; in vhost_iotlb_notify_vq()
1103 if (!dev->iotlb) { in vhost_process_iotlb_msg()
[all …]
Dvhost.h121 struct vhost_iotlb *iotlb; member
158 struct vhost_iotlb *iotlb; member
182 void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_iotlb *iotlb);
232 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb,
DMakefile19 vhost_iotlb-y := iotlb.o
Dvringh.c1112 struct vhost_iotlb *iotlb = vrh->iotlb; in iotlb_translate() local
1126 map = vhost_iotlb_itree_first(iotlb, addr, last); in iotlb_translate()
1309 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb, in vringh_set_iotlb() argument
1312 vrh->iotlb = iotlb; in vringh_set_iotlb()
/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
105 int mlx5_vdpa_handle_set_map(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb,
107 int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb);
Dresources.c237 mvdev->cvq.iotlb = vhost_iotlb_alloc(0, 0); in init_ctrl_vq()
238 if (!mvdev->cvq.iotlb) in init_ctrl_vq()
241 vringh_set_iotlb(&mvdev->cvq.vring, mvdev->cvq.iotlb, &mvdev->cvq.iommu_lock); in init_ctrl_vq()
248 vhost_iotlb_free(mvdev->cvq.iotlb); in cleanup_ctrl_vq()
/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()
402 map = vhost_iotlb_itree_first(domain->iotlb, (u64)dma_addr, in vduse_domain_free_coherent()
412 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.c694 struct vhost_iotlb *iotlb) in vduse_vdpa_set_map() argument
699 ret = vduse_domain_set_map(dev->domain, iotlb); in vduse_vdpa_set_map()
705 vduse_domain_clear_map(dev->domain, iotlb); in vduse_vdpa_set_map()
943 map = vhost_iotlb_itree_first(domain->iotlb, in vduse_dev_ioctl()
/drivers/vdpa/vdpa_sim/
Dvdpa_sim.c546 struct vhost_iotlb *iotlb) in vdpasim_set_map() argument
556 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in vdpasim_set_map()
/drivers/vdpa/mlx5/net/
Dmlx5_vnet.c2069 static int mlx5_vdpa_change_map(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) in mlx5_vdpa_change_map() argument
2081 err = mlx5_vdpa_create_mr(mvdev, iotlb); in mlx5_vdpa_change_map()
2280 static int mlx5_vdpa_set_map(struct vdpa_device *vdev, struct vhost_iotlb *iotlb) in mlx5_vdpa_set_map() argument
2286 err = mlx5_vdpa_handle_set_map(mvdev, iotlb, &change_map); in mlx5_vdpa_set_map()
2293 return mlx5_vdpa_change_map(mvdev, iotlb); in mlx5_vdpa_set_map()