[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 02/14] vdpa: stop svq at vhost_vdpa_dev_start(false)
From: |
Eugenio Pérez |
Subject: |
[PATCH v3 02/14] vdpa: stop svq at vhost_vdpa_dev_start(false) |
Date: |
Wed, 15 Feb 2023 18:38:38 +0100 |
It used to be done at vhost_vdpa_svq_cleanup, since a device couldn't
switch to SVQ mode dynamically. Now that we need to fetch the state and
trust SVQ will not modify guest's used_idx at migration, stop
effectively SVQ at suspend time, as a real device would do.
Leaving old vhost_svq_stop call at vhost_vdpa_svq_cleanup, as its
supported to call it many times and it follows other operations that are
called redundantly there too:
* vhost_vdpa_host_notifiers_uninit
* memory_listener_unregister
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
v3: New in v3
---
hw/virtio/vhost-vdpa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 542e003101..300062130d 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -1100,10 +1100,11 @@ static void vhost_vdpa_svqs_stop(struct vhost_dev *dev)
for (unsigned i = 0; i < v->shadow_vqs->len; ++i) {
VhostShadowVirtqueue *svq = g_ptr_array_index(v->shadow_vqs, i);
+
+ vhost_svq_stop(svq);
vhost_vdpa_svq_unmap_rings(dev, svq);
event_notifier_cleanup(&svq->hdev_kick);
- event_notifier_cleanup(&svq->hdev_call);
}
}
--
2.31.1
- [PATCH v3 00/14] Dynamically switch to vhost shadow virtqueues at vdpa net migration, Eugenio Pérez, 2023/02/15
- [PATCH v3 01/14] vdpa net: move iova tree creation from init to start, Eugenio Pérez, 2023/02/15
- [PATCH v3 02/14] vdpa: stop svq at vhost_vdpa_dev_start(false),
Eugenio Pérez <=
- [PATCH v3 03/14] vdpa: Negotiate _F_SUSPEND feature, Eugenio Pérez, 2023/02/15
- [PATCH v3 04/14] vdpa: add vhost_vdpa_suspend, Eugenio Pérez, 2023/02/15
- [PATCH v3 05/14] vdpa: move vhost reset after get vring base, Eugenio Pérez, 2023/02/15
- [PATCH v3 06/14] vdpa: rewind at get_base, not set_base, Eugenio Pérez, 2023/02/15
- [PATCH v3 07/14] vdpa net: allow VHOST_F_LOG_ALL, Eugenio Pérez, 2023/02/15
- [PATCH v3 08/14] vdpa: add vdpa net migration state notifier, Eugenio Pérez, 2023/02/15
- [PATCH v3 10/14] vdpa net: block migration if the device has CVQ, Eugenio Pérez, 2023/02/15
- [PATCH v3 11/14] vdpa: block migration if device has unsupported features, Eugenio Pérez, 2023/02/15