[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/13] ACPI: don't call acpi_pcihp_device_plug_cb on
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 08/13] ACPI: don't call acpi_pcihp_device_plug_cb on xen |
Date: |
Thu, 18 May 2017 00:45:24 +0300 |
From: Bruce Rogers <address@hidden>
Commit f0c9d64a exposed the issue that with a xenfv machine using
pci passthrough, acpi pci hotplug code was being executed by mistake.
Guard calls to acpi_pcihp_device_plug_cb (and corresponding
acpi_pcihp_device_unplug_cb) with a check for xen_enabled(). Without
this check I am seeing an error that the bus doesn't have the
acpi-pcihp-bsel property set.
Signed-off-by: Bruce Rogers <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/acpi/piix4.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index a553a7e..c409374 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -385,7 +385,10 @@ static void piix4_device_plug_cb(HotplugHandler
*hotplug_dev,
dev, errp);
}
} else if (object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) {
- acpi_pcihp_device_plug_cb(hotplug_dev, &s->acpi_pci_hotplug, dev,
errp);
+ if (!xen_enabled()) {
+ acpi_pcihp_device_plug_cb(hotplug_dev, &s->acpi_pci_hotplug, dev,
+ errp);
+ }
} else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
if (s->cpu_hotplug_legacy) {
legacy_acpi_cpu_plug_cb(hotplug_dev, &s->gpe_cpu, dev, errp);
@@ -408,8 +411,10 @@ static void piix4_device_unplug_request_cb(HotplugHandler
*hotplug_dev,
acpi_memory_unplug_request_cb(hotplug_dev, &s->acpi_memory_hotplug,
dev, errp);
} else if (object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) {
- acpi_pcihp_device_unplug_cb(hotplug_dev, &s->acpi_pci_hotplug, dev,
- errp);
+ if (!xen_enabled()) {
+ acpi_pcihp_device_unplug_cb(hotplug_dev, &s->acpi_pci_hotplug, dev,
+ errp);
+ }
} else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU) &&
!s->cpu_hotplug_legacy) {
acpi_cpu_unplug_request_cb(hotplug_dev, &s->cpuhp_state, dev, errp);
--
MST
- [Qemu-devel] [PULL 00/13] pci, virtio, vhost: fixes, Michael S. Tsirkin, 2017/05/17
- [Qemu-devel] [PULL 01/13] hw/acpi-defs: replace leading X with x_ in FADT field names, Michael S. Tsirkin, 2017/05/17
- [Qemu-devel] [PULL 03/13] hw/virtio: fix vhost user fails to startup when MQ, Michael S. Tsirkin, 2017/05/17
- [Qemu-devel] [PULL 04/13] libvhost-user: fix crash when rings aren't ready, Michael S. Tsirkin, 2017/05/17
- [Qemu-devel] [PULL 05/13] pc/fwcfg: unbreak migration from qemu-2.5 and qemu-2.6 during firmware boot, Michael S. Tsirkin, 2017/05/17
- [Qemu-devel] [PULL 02/13] hw/arm/virt: generate 64-bit addressable ACPI objects, Michael S. Tsirkin, 2017/05/17
- [Qemu-devel] [PULL 08/13] ACPI: don't call acpi_pcihp_device_plug_cb on xen,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 07/13] iommu: Don't crash if machine is not PC_MACHINE, Michael S. Tsirkin, 2017/05/17
- [Qemu-devel] [PULL 09/13] acpi-defs: clean up open brace usage, Michael S. Tsirkin, 2017/05/17
- [Qemu-devel] [PULL 06/13] pc: add 2.10 machine type, Michael S. Tsirkin, 2017/05/17
- [Qemu-devel] [PULL 10/13] Revert "hw/pci: disable pci-bridge's shpc by default", Michael S. Tsirkin, 2017/05/17
- [Qemu-devel] [PULL 11/13] virtio: allow broken device to notify guest, Michael S. Tsirkin, 2017/05/17
- [Qemu-devel] [PULL 12/13] pci: deassert intx when pci device unrealize, Michael S. Tsirkin, 2017/05/17
- [Qemu-devel] [PULL 13/13] exec: abstract address_space_do_translate(), Michael S. Tsirkin, 2017/05/17
- Re: [Qemu-devel] [PULL 00/13] pci, virtio, vhost: fixes, no-reply, 2017/05/17
- Re: [Qemu-devel] [PULL 00/13] pci, virtio, vhost: fixes, Stefan Hajnoczi, 2017/05/18