aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/vhost-vdpa.c
diff options
context:
space:
mode:
authorEugenio Pérez <eperezma@redhat.com>2023-08-22 10:53:29 +0200
committerMichael S. Tsirkin <mst@redhat.com>2023-10-04 04:54:21 -0400
commit6c4825476a4351530bcac17abab72295b75ffe98 (patch)
treec78e78be27e06db02c9fe98cecb3ef13feb65116 /hw/virtio/vhost-vdpa.c
parentf3fada598c909bac12bd18da36437d9bed0b9f06 (diff)
downloadqemu-6c4825476a4351530bcac17abab72295b75ffe98.zip
qemu-6c4825476a4351530bcac17abab72295b75ffe98.tar.gz
qemu-6c4825476a4351530bcac17abab72295b75ffe98.tar.bz2
vdpa: move vhost_vdpa_set_vring_ready to the caller
Doing that way allows CVQ to be enabled before the dataplane vqs, restoring the state as MQ or MAC addresses properly in the case of a migration. The patch does it by defining a ->load NetClientInfo callback also for dataplane. Ideally, this should be done by an independent patch, but the function is already static so it would only add an empty vhost_vdpa_net_data_load stub. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Message-Id: <20230822085330.3978829-5-eperezma@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Tested-by: Lei Yang <leiyang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio/vhost-vdpa.c')
-rw-r--r--hw/virtio/vhost-vdpa.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index e7de880..89ff02a 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -1303,9 +1303,6 @@ static int vhost_vdpa_dev_start(struct vhost_dev *dev, bool started)
if (unlikely(!ok)) {
return -1;
}
- for (int i = 0; i < dev->nvqs; ++i) {
- vhost_vdpa_set_vring_ready(v, dev->vq_index + i);
- }
} else {
vhost_vdpa_suspend(dev);
vhost_vdpa_svqs_stop(dev);