/Linux-v5.10/drivers/vhost/ |
D | iotlb.c | 28 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() 49 int vhost_iotlb_add_range(struct vhost_iotlb *iotlb, in vhost_iotlb_add_range() argument 58 if (iotlb->limit && in vhost_iotlb_add_range() 59 iotlb->nmaps == iotlb->limit && in vhost_iotlb_add_range() 60 iotlb->flags & VHOST_IOTLB_FLAG_RETIRE) { in vhost_iotlb_add_range() 61 map = list_first_entry(&iotlb->list, typeof(*map), link); in vhost_iotlb_add_range() 62 vhost_iotlb_map_free(iotlb, map); in vhost_iotlb_add_range() 75 iotlb->nmaps++; in vhost_iotlb_add_range() [all …]
|
D | vdpa.c | 507 struct vhost_iotlb *iotlb = dev->iotlb; in vhost_vdpa_iotlb_unmap() local 512 while ((map = vhost_iotlb_itree_first(iotlb, start, last)) != NULL) { in vhost_vdpa_iotlb_unmap() 522 vhost_iotlb_map_free(iotlb, map); in vhost_vdpa_iotlb_unmap() 531 kfree(dev->iotlb); in vhost_vdpa_iotlb_free() 532 dev->iotlb = NULL; in vhost_vdpa_iotlb_free() 565 r = vhost_iotlb_add_range(dev->iotlb, iova, iova + size - 1, in vhost_vdpa_map() 574 r = ops->set_map(vdpa, dev->iotlb); in vhost_vdpa_map() 581 vhost_iotlb_del_range(dev->iotlb, iova, iova + size - 1); in vhost_vdpa_map() 600 ops->set_map(vdpa, dev->iotlb); in vhost_vdpa_unmap() 610 struct vhost_iotlb *iotlb = dev->iotlb; in vhost_vdpa_process_iotlb_update() local [all …]
|
D | vhost.c | 339 vq->iotlb = NULL; in vhost_vq_reset() 482 dev->iotlb = NULL; in vhost_dev_init() 711 vhost_iotlb_free(dev->iotlb); in vhost_dev_cleanup() 712 dev->iotlb = NULL; in vhost_dev_cleanup() 816 if (!vq->iotlb) in vhost_copy_to_user() 851 if (!vq->iotlb) in vhost_copy_from_user() 932 if (!vq->iotlb) { \ 977 if (!vq->iotlb) { \ 1057 struct vhost_iotlb_msg *vq_msg = &node->msg.iotlb; in vhost_iotlb_notify_vq() 1096 if (!dev->iotlb) { in vhost_process_iotlb_msg() [all …]
|
D | vhost.h | 118 struct vhost_iotlb *iotlb; member 155 struct vhost_iotlb *iotlb; member 179 void vhost_dev_reset_owner(struct vhost_dev *dev, struct vhost_iotlb *iotlb); 228 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb,
|
D | Makefile | 19 vhost_iotlb-y := iotlb.o
|
D | vringh.c | 1072 struct vhost_iotlb *iotlb = vrh->iotlb; in iotlb_translate() local 1084 map = vhost_iotlb_itree_first(iotlb, addr, in iotlb_translate() 1265 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb) in vringh_set_iotlb() argument 1267 vrh->iotlb = iotlb; in vringh_set_iotlb()
|
/Linux-v5.10/include/linux/ |
D | vhost_iotlb.h | 32 int vhost_iotlb_add_range(struct vhost_iotlb *iotlb, u64 start, u64 last, 34 void vhost_iotlb_del_range(struct vhost_iotlb *iotlb, u64 start, u64 last); 37 void vhost_iotlb_free(struct vhost_iotlb *iotlb); 38 void vhost_iotlb_reset(struct vhost_iotlb *iotlb); 41 vhost_iotlb_itree_first(struct vhost_iotlb *iotlb, u64 start, u64 last); 45 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb,
|
D | vringh.h | 47 struct vhost_iotlb *iotlb; member 261 void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb);
|
D | vdpa.h | 236 int (*set_map)(struct vdpa_device *vdev, struct vhost_iotlb *iotlb);
|
/Linux-v5.10/drivers/vdpa/mlx5/core/ |
D | mr.c | 227 struct vhost_iotlb *iotlb) in map_direct_mr() argument 243 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1); in map_direct_mr() 259 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1); in map_direct_mr() 306 struct vhost_iotlb *iotlb) in add_direct_chain() argument 329 err = map_direct_mr(mvdev, dmr, iotlb); in add_direct_chain() 360 static int _mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) in _mlx5_vdpa_create_mr() argument 378 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in _mlx5_vdpa_create_mr() 393 err = add_direct_chain(mvdev, ps, pe - ps, pperm, iotlb); in _mlx5_vdpa_create_mr() 402 err = add_direct_chain(mvdev, ps, pe - ps, pperm, iotlb); in _mlx5_vdpa_create_mr() 426 int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) in mlx5_vdpa_create_mr() argument [all …]
|
D | mlx5_vdpa.h | 74 int mlx5_vdpa_handle_set_map(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, 76 int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb);
|
/Linux-v5.10/include/uapi/linux/ |
D | vhost_types.h | 83 struct vhost_iotlb_msg iotlb; member 92 struct vhost_iotlb_msg iotlb; member
|
/Linux-v5.10/drivers/vdpa/vdpa_sim/ |
D | vdpa_sim.c | 603 struct vhost_iotlb *iotlb) in vdpasim_set_map() argument 613 for (map = vhost_iotlb_itree_first(iotlb, start, last); map; in vdpasim_set_map()
|
/Linux-v5.10/drivers/vdpa/mlx5/net/ |
D | mlx5_vnet.c | 1646 static int mlx5_vdpa_change_map(struct mlx5_vdpa_net *ndev, struct vhost_iotlb *iotlb) in mlx5_vdpa_change_map() argument 1657 err = mlx5_vdpa_create_mr(&ndev->mvdev, iotlb); in mlx5_vdpa_change_map() 1802 static int mlx5_vdpa_set_map(struct vdpa_device *vdev, struct vhost_iotlb *iotlb) in mlx5_vdpa_set_map() argument 1809 err = mlx5_vdpa_handle_set_map(mvdev, iotlb, &change_map); in mlx5_vdpa_set_map() 1816 return mlx5_vdpa_change_map(ndev, iotlb); in mlx5_vdpa_set_map()
|