[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-upstream-unstable] pc: piix4_pm: init legacy PCI hotplug when running on Xen



commit 0c94ca5ffeb6d314404ecbc231bef28fe8d3fc51
Author:     Igor Mammedov <imammedo@xxxxxxxxxx>
AuthorDate: Fri Nov 14 11:11:44 2014 +0000
Commit:     Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
CommitDate: Mon Nov 17 11:19:34 2014 +0000

    pc: piix4_pm: init legacy PCI hotplug when running on Xen
    
    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.
    
    From: Igor Mammedov <imammedo@xxxxxxxxxx>
    
    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.
    
    upstream-commit-id: 91ab2ed7221c70ed7fd09ab2665b1f0493c775a4
    
    Signed-off-by: Igor Mammedov <imammedo@xxxxxxxxxx>
    Signed-off-by: Li Liang <liang.z.li@xxxxxxxxx>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
    Acked-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
    Tested-by: Li Liang <liang.z.li@xxxxxxxxx>
    
    Conflicts:
        hw/acpi/piix4.c
---
 hw/acpi/piix4.c   |    4 ++++
 hw/i386/pc_piix.c |   11 -----------
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 67dc075..709b312 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -33,6 +33,7 @@
 #include "hw/acpi/pcihp.h"
 #include "hw/acpi/cpu_hotplug.h"
 #include "hw/hotplug.h"
+#include "hw/xen/xen.h"
 
 //#define DEBUG
 
@@ -453,6 +454,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 (xen_enabled()) {
+        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 ce708c7..4cbd993 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -837,17 +837,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
 
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.