aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorEugenio Pérez <eperezma@redhat.com>2022-12-15 12:31:38 +0100
committerMichael S. Tsirkin <mst@redhat.com>2022-12-21 06:35:28 -0500
commita585fad26b2e6ccca156d9e65158ad1c5efd268d (patch)
tree0cdb4b6ad02d985a972e356a1dccca203a969e60 /hw
parent36e4647247f200b6fa4d2f656133f567036e8a85 (diff)
vdpa: request iova_range only once
Currently iova range is requested once per queue pair in the case of net. Reduce the number of ioctls asking it once at initialization and reusing that value for each vhost_vdpa. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Message-Id: <20221215113144.322011-7-eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasonwang@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/virtio/vhost-vdpa.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 014c69a475..7f6bfd961c 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -365,19 +365,6 @@ static int vhost_vdpa_add_status(struct vhost_dev *dev, uint8_t status)
return 0;
}
-static void vhost_vdpa_get_iova_range(struct vhost_vdpa *v)
-{
- int ret = vhost_vdpa_call(v->dev, VHOST_VDPA_GET_IOVA_RANGE,
- &v->iova_range);
- if (ret != 0) {
- v->iova_range.first = 0;
- v->iova_range.last = UINT64_MAX;
- }
-
- trace_vhost_vdpa_get_iova_range(v->dev, v->iova_range.first,
- v->iova_range.last);
-}
-
/*
* The use of this function is for requests that only need to be
* applied once. Typically such request occurs at the beginning
@@ -465,8 +452,6 @@ static int vhost_vdpa_init(struct vhost_dev *dev, void *opaque, Error **errp)
goto err;
}
- vhost_vdpa_get_iova_range(v);
-
if (!vhost_vdpa_first_dev(dev)) {
return 0;
}