summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPankaj Gupta <pankaj.gupta.linux@gmail.com>2020-09-25 12:22:51 +0200
committerMichael S. Tsirkin <mst@redhat.com>2020-09-29 02:14:30 -0400
commitf68ec01fe965e8c06ce6181fe28e1a9bef352cff (patch)
tree45691052dd0d71ed414d4da59b7656437fd99aed /hw
parent8f39562a1b7e0590ca048284dbcbfaee17e136b8 (diff)
downloadqemu-f68ec01fe965e8c06ce6181fe28e1a9bef352cff.zip
virtio-pmem-pci: force virtio version 1
Qemu fails with below error when trying to run with virtio pmem: (qemu) qemu-system-x86_64: -device virtio-pmem-pci,memdev=mem1,id=nv1: device is modern-only, use disable-legacy=on This patch fixes this by forcing virtio 1 with virtio-pmem. fixes: adf0748a49 ("virtio-pci: Proxy for virtio-pmem") Signed-off-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com> Message-Id: <20200925102251.7216-1-pankaj.gupta.linux@gmail.com> Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/virtio/virtio-pmem-pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/virtio/virtio-pmem-pci.c b/hw/virtio/virtio-pmem-pci.c
index 21a457d151..2b2a0b1eae 100644
--- a/hw/virtio/virtio-pmem-pci.c
+++ b/hw/virtio/virtio-pmem-pci.c
@@ -22,6 +22,7 @@ static void virtio_pmem_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
VirtIOPMEMPCI *pmem_pci = VIRTIO_PMEM_PCI(vpci_dev);
DeviceState *vdev = DEVICE(&pmem_pci->vdev);
+ virtio_pci_force_virtio_1(vpci_dev);
qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
}