[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/33] pcihp: piix4: do not redirect hotplug controller to piix4
From: |
Igor Mammedov |
Subject: |
[PATCH 10/33] pcihp: piix4: do not redirect hotplug controller to piix4 when ACPI hotplug is disabled |
Date: |
Fri, 24 Feb 2023 16:37:49 +0100 |
commit [1] added ability to disable ACPI PCI hotplug
on hostbridge but forgot to take into account that it
should disable all ACPI hotplug machinery in case both
hostbridge and bridge hotplug are disabled.
Commit [2] tried to fix that, however it forgot to
remove hotplug_handler override which hands hotplug
control over to piix4 hotplug controller
(uninitialized after [2]).
As result at the time bridge is plugged in, its default
(SHPC) hotplug handler is replaced by piix4 one in
acpi_pcihp_device_plug_cb()
...
if (!s->legacy_piix &&
...
qbus_set_hotplug_handler(BUS(sec), OBJECT(hotplug_dev));
which is acting on uninitialized s->legacy_piix value
(0 by default) that was supposed to be initialized by
acpi_pcihp_init(), that is no longer called due to
following condition being false:
piix4_acpi_system_hot_add_init()
if (s->use_acpi_hotplug_bridge || s->use_acpi_root_pci_hotplug) {
and the bridge ends up with piix4 as hotplug handler
instead of shpc one.
Followup hotplug on that bridge as result yields
piix4 specific error:
Error: Unsupported bus. Bus doesn't have property 'acpi-pcihp-bsel' set
1) 3d7e78aa777 (Introduce a new flag for i440fx to disable PCI hotplug on the
root bus)
2) df4008c9c59 (piix4: don't reserve hw resources when hotplug is off globally)
Fixes: df4008c9c59 (piix4: don't reserve hw resources when hotplug is off
globally)
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
hw/acpi/piix4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index eac2125abd..8fc422829a 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -492,7 +492,6 @@ static void piix4_pm_realize(PCIDevice *dev, Error **errp)
piix4_acpi_system_hot_add_init(pci_address_space_io(dev),
pci_get_bus(dev), s);
- qbus_set_hotplug_handler(BUS(pci_get_bus(dev)), OBJECT(s));
piix4_pm_add_properties(s);
}
@@ -564,6 +563,7 @@ static void piix4_acpi_system_hot_add_init(MemoryRegion
*parent,
if (s->use_acpi_hotplug_bridge || s->use_acpi_root_pci_hotplug) {
acpi_pcihp_init(OBJECT(s), &s->acpi_pci_hotplug, bus, parent,
s->use_acpi_hotplug_bridge, ACPI_PCIHP_ADDR_PIIX4);
+ qbus_set_hotplug_handler(BUS(pci_get_bus(PCI_DEVICE(s))), OBJECT(s));
}
s->cpu_hotplug_legacy = true;
--
2.39.1
- [PATCH 12/33] tests: acpi: whitelist DSDT blobs before isolating PCI _DSM func 0 prolog, (continued)
- [PATCH 12/33] tests: acpi: whitelist DSDT blobs before isolating PCI _DSM func 0 prolog, Igor Mammedov, 2023/02/24
- [PATCH 15/33] tests: acpi: whitelist DSDT before adding EDSM method, Igor Mammedov, 2023/02/24
- [PATCH 14/33] tests: acpi: update expected blobs, Igor Mammedov, 2023/02/24
- [PATCH 16/33] acpi: pci: add EDSM method to DSDT, Igor Mammedov, 2023/02/24
- [PATCH 18/33] tests: acpi: whitelist DSDT before adding device with acpi-index to testcases, Igor Mammedov, 2023/02/24
- [PATCH 17/33] tests: acpi: update expected blobs, Igor Mammedov, 2023/02/24
- [PATCH 09/33] tests: acpi: update expected blobs, Igor Mammedov, 2023/02/24
- [PATCH 04/33] tests: acpi: whitelist q35/DSDT.multi-bridge before extending testcase, Igor Mammedov, 2023/02/24
- [PATCH 06/33] x86: pcihp: fix missing PCNT callchain when intermediate root-port has 'hotplug=off' set, Igor Mammedov, 2023/02/24
- [PATCH 07/33] tests: acpi: whitelist pc/DSDT.hpbrroot and pc/DSDT.hpbridge tests, Igor Mammedov, 2023/02/24
- [PATCH 10/33] pcihp: piix4: do not redirect hotplug controller to piix4 when ACPI hotplug is disabled,
Igor Mammedov <=
- [PATCH 13/33] pcihp: move PCI _DSM function 0 prolog into separate function, Igor Mammedov, 2023/02/24
- [PATCH 11/33] pci: fix 'hotplugglable' property behavior, Igor Mammedov, 2023/02/24
- [PATCH 19/33] tests: acpi: add device with acpi-index on non-hotpluggble bus, Igor Mammedov, 2023/02/24
- [PATCH 20/33] acpi: pci: support acpi-index for non-hotpluggable devices, Igor Mammedov, 2023/02/24
- [PATCH 22/33] tests: acpi: whitelist DSDT before exposing non zero functions, Igor Mammedov, 2023/02/24
- [PATCH 21/33] tests: acpi: update expected blobs, Igor Mammedov, 2023/02/24
- [PATCH 26/33] tests: acpi: add non zero function device with acpi-index on non-hotpluggble bus, Igor Mammedov, 2023/02/24
- [PATCH 24/33] tests: acpi: update expected blobs, Igor Mammedov, 2023/02/24
- [PATCH 25/33] tests: acpi: whitelist DSDT before adding non-0 function device with acpi-index to testcases, Igor Mammedov, 2023/02/24
- [PATCH 23/33] acpi: pci: describe all functions on populated slots, Igor Mammedov, 2023/02/24