From: Eugenio Pérez Date: Fri, 2 Jun 2023 14:38:52 +0000 (+0200) Subject: vdpa: do not block migration if device has cvq and x-svq=on X-Git-Tag: v8.1.0-rc0~42^2~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8bc0049eadafb984d305c847cedff550b58e5fc0;p=thirdparty%2Fqemu.git vdpa: do not block migration if device has cvq and x-svq=on It was a mistake to forbid in all cases, as SVQ is already able to send all the CVQ messages before start forwarding data vqs. It actually caused a regression, making impossible to migrate device previously migratable. Fixes: 36e4647247f2 ("vdpa: add vhost_vdpa_net_valid_svq_features") Signed-off-by: Eugenio Pérez Message-Id: <20230602143854.1879091-2-eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Lei Yang --- diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 46778d5313c..4345f1e6de8 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -915,13 +915,16 @@ static NetClientState *net_vhost_vdpa_init(NetClientState *peer, s->cvq_isolated = cvq_isolated; /* - * TODO: We cannot migrate devices with CVQ as there is no way to set - * the device state (MAC, MQ, etc) before starting the datapath. + * TODO: We cannot migrate devices with CVQ and no x-svq enabled as + * there is no way to set the device state (MAC, MQ, etc) before + * starting the datapath. * * Migration blocker ownership now belongs to s->vhost_vdpa. */ - error_setg(&s->vhost_vdpa.migration_blocker, - "net vdpa cannot migrate with CVQ feature"); + if (!svq) { + error_setg(&s->vhost_vdpa.migration_blocker, + "net vdpa cannot migrate with CVQ feature"); + } } ret = vhost_vdpa_add(nc, (void *)&s->vhost_vdpa, queue_pair_index, nvqs); if (ret) {