[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 11/34] pcihp: piix4: do not redirect hotplug controller to pii
From: |
Igor Mammedov |
Subject: |
[PATCH v2 11/34] pcihp: piix4: do not redirect hotplug controller to piix4 when ACPI hotplug is disabled |
Date: |
Thu, 2 Mar 2023 17:15:20 +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 v2 00/34] pci(pc/q35): acpi-index support on non-hotpluggable slots, Igor Mammedov, 2023/03/02
- [PATCH v2 01/34] Revert "tests/qtest: Check for devices in bios-tables-test", Igor Mammedov, 2023/03/02
- [PATCH v2 03/34] tests: acpi: add test_acpi_q35_tcg_no_acpi_hotplug test and extend test_acpi_piix4_no_acpi_pci_hotplug, Igor Mammedov, 2023/03/02
- [PATCH v2 19/34] tests: acpi: whitelist DSDT before adding device with acpi-index to testcases, Igor Mammedov, 2023/03/02
- [PATCH v2 10/34] tests: acpi: update expected blobs, Igor Mammedov, 2023/03/02
- [PATCH v2 21/34] acpi: pci: support acpi-index for non-hotpluggable devices, Igor Mammedov, 2023/03/02
- [PATCH v2 27/34] tests: acpi: add non zero function device with acpi-index on non-hotpluggble bus, Igor Mammedov, 2023/03/02
- [PATCH v2 06/34] tests: acpi: extend multi-bridge case with case 'root-port, id=HOHP, hotplug=off root-port, bus=NOHP', Igor Mammedov, 2023/03/02
- [PATCH v2 15/34] tests: acpi: update expected blobs, Igor Mammedov, 2023/03/02
- [PATCH v2 11/34] pcihp: piix4: do not redirect hotplug controller to piix4 when ACPI hotplug is disabled,
Igor Mammedov <=
- [PATCH v2 23/34] tests: acpi: whitelist DSDT before exposing non zero functions, Igor Mammedov, 2023/03/02
- [PATCH v2 26/34] tests: acpi: whitelist DSDT before adding non-0 function device with acpi-index to testcases, Igor Mammedov, 2023/03/02
- [PATCH v2 13/34] tests: acpi: whitelist DSDT blobs before isolating PCI _DSM func 0 prolog, Igor Mammedov, 2023/03/02
- [PATCH v2 14/34] pcihp: move PCI _DSM function 0 prolog into separate function, Igor Mammedov, 2023/03/02
- [PATCH v2 18/34] tests: acpi: update expected blobs, Igor Mammedov, 2023/03/02
- [PATCH v2 04/34] tests: acpi: update expected blobs, Igor Mammedov, 2023/03/02
- [PATCH v2 22/34] tests: acpi: update expected blobs, Igor Mammedov, 2023/03/02
- [PATCH v2 28/34] tests: acpi: update expected blobs, Igor Mammedov, 2023/03/02
- [PATCH v2 29/34] pci: move acpi-index uniqueness check to generic PCI device code, Igor Mammedov, 2023/03/02
- [PATCH v2 33/34] pcihp: move fields enabling hotplug into AcpiPciHpState, Igor Mammedov, 2023/03/02