qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] pc: piix4_pm: init legacy PCI hotplug when running on Xen
@ 2014-05-23 12:03 Igor Mammedov
  2014-05-23 14:28 ` Stefano Stabellini
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Igor Mammedov @ 2014-05-23 12:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: anthony.perard, tiejun.chen, stefano.stabellini, aliguori, mst

if user starts QEMU with "-machine pc,accel=xen", then
compat property in xenfv won't work and it would
cause error:
"Unsupported bus. Bus doesn't have property 'acpi-pcihp-bsel' set"
when PCI device is added with -device on QEMU CLI.

In case of Xen instead of using compat property,
just use the fact that xen doesn't use QEMU's
fw_cfg/acpi tables to switch piix4_pm into legacy
PCI hotplug mode when Xen is enabled.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/acpi/piix4.c   |  3 +++
 hw/i386/pc_piix.c | 11 -----------
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 227ea30..12542c3 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -501,6 +501,9 @@ I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
     s->irq = sci_irq;
     s->smi_irq = smi_irq;
     s->kvm_enabled = kvm_enabled;
+    if (!fw_cfg) {
+        s->use_acpi_pci_hotplug = false;
+    }
 
     qdev_init_nofail(dev);
 
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index a13e8d6..067ff0c 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -840,17 +840,6 @@ static QEMUMachine xenfv_machine = {
     .max_cpus = HVM_MAX_VCPUS,
     .default_machine_opts = "accel=xen",
     .hot_add_cpu = pc_hot_add_cpu,
-    .compat_props = (GlobalProperty[]) {
-        /* xenfv has no fwcfg and so does not load acpi from QEMU.
-         * as such new acpi features don't work.
-         */
-        {
-            .driver   = "PIIX4_PM",
-            .property = "acpi-pci-hotplug-with-bridge-support",
-            .value    = "off",
-        },
-        { /* end of list */ }
-    },
 };
 #endif
 
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-11-11  3:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23 12:03 [Qemu-devel] [PATCH] pc: piix4_pm: init legacy PCI hotplug when running on Xen Igor Mammedov
2014-05-23 14:28 ` Stefano Stabellini
2014-11-04  4:48 ` Wu, Feng
2014-11-04 10:36   ` Stefano Stabellini
2014-11-04 14:07     ` Paolo Bonzini
2014-11-04 15:24       ` Stefano Stabellini
2014-11-10  4:01 ` Zhang, Yang Z
2014-11-10 11:42   ` Stefano Stabellini
2014-11-11  3:32     ` Zhang, Yang Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).