From dd56040d297a0c530e204e9f459b256e3ddd7e8f Mon Sep 17 00:00:00 2001 From: Dr. David Alan Gilbert Date: Mon, 29 Jul 2019 17:29:03 +0100 Subject: Revert "hw: report invalid disable-legacy|modern usage for virtio-1-only devs" This reverts commit f2784eed306449c3d04a71a05ed6463b8289aedf since that accidentally removes the PCIe capabilities from virtio devices because virtio_pci_dc_realize is called before the new 'mode' flag is set. Signed-off-by: Dr. David Alan Gilbert Message-Id: <20190729162903.4489-3-dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Daniel P. Berrangé Reviewed-by: Cornelia Huck --- hw/virtio/virtio-input-pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'hw/virtio/virtio-input-pci.c') diff --git a/hw/virtio/virtio-input-pci.c b/hw/virtio/virtio-input-pci.c index 1c40292abc..ad7774e93e 100644 --- a/hw/virtio/virtio-input-pci.c +++ b/hw/virtio/virtio-input-pci.c @@ -49,9 +49,7 @@ static void virtio_input_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp) DeviceState *vdev = DEVICE(&vinput->vdev); qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus)); - if (!virtio_pci_force_virtio_1(vpci_dev, errp)) { - return; - } + virtio_pci_force_virtio_1(vpci_dev); object_property_set_bool(OBJECT(vdev), true, "realized", errp); } -- cgit v1.2.3-55-g7522