diff mbox series

[6/7] vdpa: enable cvq svq if data vq are shadowed

Message ID 20230728172028.2074052-7-eperezma@redhat.com (mailing list archive)
State New, archived
Headers show
Series Enable vdpa net migration with features depending on CVQ | expand

Commit Message

Eugenio Perez Martin July 28, 2023, 5:20 p.m. UTC
Previous to this commit, it was assumed that data can only be shadowed
with x-cvq, or if a migration was in place.  So CVQ did not need to
check for migration.

Signed-off-by: Eugenio PĂ©rez <eperezma@redhat.com>
---
 net/vhost-vdpa.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 2c1cfda657..118837c6b9 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -514,11 +514,10 @@  static int vhost_vdpa_net_cvq_start(NetClientState *nc)
 
     s0 = vhost_vdpa_net_first_nc_vdpa(s);
     v->shadow_data = s0->vhost_vdpa.shadow_vqs_enabled;
-    v->shadow_vqs_enabled = s->always_svq;
+    v->shadow_vqs_enabled = v->shadow_data;
     s->vhost_vdpa.address_space_id = VHOST_VDPA_GUEST_PA_ASID;
 
-    if (s->vhost_vdpa.shadow_data) {
-        /* SVQ is already configured for all virtqueues */
+    if (s->always_svq) {
         goto out;
     }