From d160024fe52cd4970ee80904dbdc7a22ddf86c96 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Tue, 4 Feb 2014 23:29:30 +0200 Subject: pc_piix: enable legacy hotplug for Xen xenfv has no fwcfg and so does not load acpi from QEMU. as such new acpi features don't work. Reported-by: Sander Eikelenboom Signed-off-by: Michael S. Tsirkin --- hw/i386/pc_piix.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'hw/i386') diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index a327d71fb1..1acd2b2a20 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -793,6 +793,17 @@ 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 -- cgit v1.2.1 From 7454e51d2b26ca6c2fd6fb77c4adc3ab11ec590f Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Sun, 2 Feb 2014 22:45:28 +0200 Subject: pc.c: better error message on initrd sizing failure Signed-off-by: Michael S. Tsirkin --- hw/i386/pc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/i386') diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 348b15f267..e715a3312d 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -835,8 +835,8 @@ static void load_linux(FWCfgState *fw_cfg, initrd_size = get_image_size(initrd_filename); if (initrd_size < 0) { - fprintf(stderr, "qemu: error reading initrd %s\n", - initrd_filename); + fprintf(stderr, "qemu: error reading initrd %s: %s\n", + initrd_filename, strerror(errno)); exit(1); } -- cgit v1.2.1 From 2897ae026758eac78284ba6c3bd7732f3a1d9987 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Wed, 5 Feb 2014 16:36:48 +0100 Subject: qdev:pci: refactor PCIDevice to use generic "hotpluggable" property Get rid of PCIDevice specific PCIDeviceClass.no_hotplug and use generic DeviceClass.hotpluggable field instead. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/i386') diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 50e83f3b46..b1a7ebb8e3 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -768,6 +768,7 @@ static void build_pci_bus_end(PCIBus *bus, void *bus_state) memset(slot_hotplug_enable, 0xff, sizeof slot_hotplug_enable); for (i = 0; i < ARRAY_SIZE(bus->devices); ++i) { + DeviceClass *dc; PCIDeviceClass *pc; PCIDevice *pdev = bus->devices[i]; @@ -776,8 +777,9 @@ static void build_pci_bus_end(PCIBus *bus, void *bus_state) } pc = PCI_DEVICE_GET_CLASS(pdev); + dc = DEVICE_GET_CLASS(pdev); - if (pc->no_hotplug || pc->is_bridge) { + if (!dc->hotpluggable || pc->is_bridge) { int slot = PCI_SLOT(i); clear_bit(slot, slot_hotplug_enable); -- cgit v1.2.1 From 417c45ab2f847c0a47b1232f611aa886df6a97d5 Mon Sep 17 00:00:00 2001 From: "Gabriel L. Somlo" Date: Fri, 7 Feb 2014 10:30:40 -0500 Subject: ACPI: Remove commented-out code from HPET._CRS IRQNoFlags on HPET._CRS crashes WinXP because it causes the HPET to conflict with the system timer and/or the RTC. It only occurs on Apple hardware, and even there it is exposed fully only when OS X is detected (via _OSI). Recent OS X versions work on QEMU without this statement, so at this time there is no need to find a better way to conditionally include the statement. This patch removes the commented out (and wrong, should have been {0, 8}) statement from HPET._CRS. Signed-off-by: Gabriel Somlo Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-By: Igor Mammedov --- hw/i386/acpi-dsdt-hpet.dsl | 3 --- 1 file changed, 3 deletions(-) (limited to 'hw/i386') diff --git a/hw/i386/acpi-dsdt-hpet.dsl b/hw/i386/acpi-dsdt-hpet.dsl index dfde174317..44961b87a1 100644 --- a/hw/i386/acpi-dsdt-hpet.dsl +++ b/hw/i386/acpi-dsdt-hpet.dsl @@ -39,9 +39,6 @@ Scope(\_SB) { Return (0x0F) } Name(_CRS, ResourceTemplate() { -#if 0 /* This makes WinXP BSOD for not yet figured reasons. */ - IRQNoFlags() {2, 8} -#endif Memory32Fixed(ReadOnly, 0xFED00000, // Address Base 0x00000400, // Address Length -- cgit v1.2.1