]> git.proxmox.com Git - mirror_qemu.git/commit
virtio-net: clear guest_announce feature if no cvq backend
authorEugenio Pérez <eperezma@redhat.com>
Tue, 24 Jan 2023 16:11:59 +0000 (17:11 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 2 Mar 2023 08:10:46 +0000 (03:10 -0500)
commitcd69d47cddabc9adf4562ac968437bb547f46630
tree3b1096fab9bb7f48b5bf16fdabe9528515f93795
parent167f4873580d3729565044cda73c3e20997950f2
virtio-net: clear guest_announce feature if no cvq backend

Since GUEST_ANNOUNCE is emulated the feature bit could be set without
backend support.  This happens in the vDPA case.

However, backend vDPA parent may not have CVQ support.  This causes an
incoherent feature set, and the driver may refuse to start.  This
happens in virtio-net Linux driver.

This may be solved differently in the future.  Qemu is able to emulate a
CVQ just for guest_announce purposes, helping guest to notify the new
location with vDPA devices that does not support it.  However, this is
left as a TODO as it is way more complex to backport.

Tested with vdpa_net_sim, toggling manually VIRTIO_NET_F_CTRL_VQ in the
driver and migrating it with x-svq=on.

Fixes: 980003debddd ("vdpa: do not handle VIRTIO_NET_F_GUEST_ANNOUNCE in vhost-vdpa")
Reported-by: Dawar, Gautam <gautam.dawar@amd.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20230124161159.2182117-1-eperezma@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: David Edmondson <david.edmondson@oracle.com>
Reviewed-by: Gautam Dawar <gautam.dawar@amd.com>
Tested-by: Gautam Dawar <gautam.dawar@amd.com>
Tested-by: Lei Yang <leiyang@redhat.com>
hw/net/virtio-net.c