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" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/core/machine.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'hw/core') diff --git a/hw/core/machine.c b/hw/core/machine.c index c58a8e594e..c4a2ab2282 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -115,26 +115,9 @@ const size_t hw_compat_2_7_len = G_N_ELEMENTS(hw_compat_2_7); GlobalProperty hw_compat_2_6[] = { { "virtio-mmio", "format_transport_address", "off" }, - /* - * don't include devices which are modern-only - * ie keyboard, mouse, tablet, gpu, vga & crypto - */ - { "virtio-9p-pci", "disable-modern", "on" }, - { "virtio-9p-pci", "disable-legacy", "off" }, - { "virtio-balloon-pci", "disable-modern", "on" }, - { "virtio-balloon-pci", "disable-legacy", "off" }, - { "virtio-blk-pci", "disable-modern", "on" }, - { "virtio-blk-pci", "disable-legacy", "off" }, - { "virtio-input-host-pci", "disable-modern", "on" }, - { "virtio-input-host-pci", "disable-legacy", "off" }, - { "virtio-net-pci", "disable-modern", "on" }, - { "virtio-net-pci", "disable-legacy", "off" }, - { "virtio-rng-pci", "disable-modern", "on" }, - { "virtio-rng-pci", "disable-legacy", "off" }, - { "virtio-scsi-pci", "disable-modern", "on" }, - { "virtio-scsi-pci", "disable-legacy", "off" }, - { "virtio-serial-pci", "disable-modern", "on" }, - { "virtio-serial-pci", "disable-legacy", "off" }, + /* Optional because not all virtio-pci devices support legacy mode */ + { "virtio-pci", "disable-modern", "on", .optional = true }, + { "virtio-pci", "disable-legacy", "off", .optional = true }, }; const size_t hw_compat_2_6_len = G_N_ELEMENTS(hw_compat_2_6); -- cgit v1.2.3