summary refs log tree commit diff stats
path: root/hw/core/machine.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2019-07-29 17:29:03 +0100
committerMichael S. Tsirkin <mst@redhat.com>2019-07-29 16:57:27 -0400
commitdd56040d297a0c530e204e9f459b256e3ddd7e8f (patch)
tree0a4174482e923564cb2b89ea733dab9f15a5c674 /hw/core/machine.c
parent92fd453c6717acbeafcbbac39084a6f1c9ac6827 (diff)
downloadfocaccia-qemu-dd56040d297a0c530e204e9f459b256e3ddd7e8f.tar.gz
focaccia-qemu-dd56040d297a0c530e204e9f459b256e3ddd7e8f.zip
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 <dgilbert@redhat.com>
Message-Id: <20190729162903.4489-3-dgilbert@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/core/machine.c')
-rw-r--r--hw/core/machine.c23
1 files changed, 3 insertions, 20 deletions
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);