Hi, Qinghua discovered that virtio-vsock-pci requires 'disable-legacy=on' in QEMU 5.1: $ ./qemu-system-x86_64 ... -device vhost-vsock-pci,guest-cid=5 qemu-system-x86_64: -device vhost-vsock-pci,guest-cid=5: device is modern-only, use disable-legacy=on
Bisecting I found that this behaviour starts from this commit: 9b3a35ec82 ("virtio: verify that legacy support is not accidentally on") IIUC virtio-vsock is modern-only, so I tried this patch and it works: diff --git a/hw/virtio/vhost-user-vsock-pci.c b/hw/virtio/vhost-user-vsock-pci.c index f4cf95873d..6e4cc874cd 100644 --- a/hw/virtio/vhost-user-vsock-pci.c +++ b/hw/virtio/vhost-user-vsock-pci.c @@ -40,6 +40,7 @@ static void vhost_user_vsock_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) VHostUserVSockPCI *dev = VHOST_USER_VSOCK_PCI(vpci_dev); DeviceState *vdev = DEVICE(&dev->vdev); + virtio_pci_force_virtio_1(vpci_dev); qdev_realize(vdev, BUS(&vpci_dev->bus), errp); } diff --git a/hw/virtio/vhost-vsock-pci.c b/hw/virtio/vhost-vsock-pci.c index a815278e69..f641b974e9 100644 --- a/hw/virtio/vhost-vsock-pci.c +++ b/hw/virtio/vhost-vsock-pci.c @@ -44,6 +44,7 @@ static void vhost_vsock_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) VHostVSockPCI *dev = VHOST_VSOCK_PCI(vpci_dev); DeviceState *vdev = DEVICE(&dev->vdev); + virtio_pci_force_virtio_1(vpci_dev); qdev_realize(vdev, BUS(&vpci_dev->bus), errp); } Do you think this is the right approach or is there a better way to solve this issue? Thanks, Stefano