[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 37/56] x86: pcihp: acpi: prepare slot ignore rule to work with sel
From: |
Michael S. Tsirkin |
Subject: |
[PULL 37/56] x86: pcihp: acpi: prepare slot ignore rule to work with self describing bridges |
Date: |
Mon, 30 Jan 2023 15:20:46 -0500 |
From: Igor Mammedov <imammedo@redhat.com>
Before switching pci bridges to AcpiDevAmlIf interface, ensure that
ignored slots are handled correctly.
(existing rule works but only if bridge doesn't have AcpiDevAmlIf interface).
While at it rewrite related comments to be less confusing (hopefully).
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20230112140312.3096331-28-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/acpi-build.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 6368fcefa3..8045b20713 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -423,14 +423,22 @@ static void build_append_pci_bus_devices(Aml
*parent_scope, PCIBus *bus,
hotpluggbale_slot = bsel && dc->hotpluggable &&
!cold_plugged_bridge;
- /*
- * allow describing coldplugged bridges in ACPI even if they are
not
- * on function 0, as they are not unpluggable, for all other
devices
- * generate description only for function 0 per slot, and for other
- * functions if device on function provides its own AML
- */
- if (func && !bridge_in_acpi && !get_dev_aml_func(DEVICE(pdev))) {
- continue;
+ if (func) {
+ if (IS_PCI_BRIDGE(pdev)) {
+ /*
+ * Ignore only hotplugged PCI bridges on !0 functions, but
+ * allow describing cold plugged bridges on all functions
+ */
+ if (DEVICE(pdev)->hotplugged) {
+ continue;
+ }
+ } else if (!get_dev_aml_func(DEVICE(pdev))) {
+ /*
+ * Ignore all other devices on !0 functions unless they
+ * have AML description (i.e have get_dev_aml_func() != 0)
+ */
+ continue;
+ }
}
} else {
/*
--
MST
- [PULL 29/56] tests: acpi: update expected blobs, (continued)
- [PULL 29/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30
- [PULL 21/56] pci: acpihp: assign BSEL only to coldplugged bridges, Michael S. Tsirkin, 2023/01/30
- [PULL 30/56] tests: acpi: whitelist DSDT before refactoring acpi based PCI hotplug machinery, Michael S. Tsirkin, 2023/01/30
- [PULL 31/56] pcihp: compose PCNT callchain right before its user _GPE._E01, Michael S. Tsirkin, 2023/01/30
- [PULL 33/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30
- [PULL 38/56] pci: acpi: wire up AcpiDevAmlIf interface to generic bridge, Michael S. Tsirkin, 2023/01/30
- [PULL 35/56] tests: acpi: add endpoint devices to bridges, Michael S. Tsirkin, 2023/01/30
- [PULL 26/56] tests: acpi: add reboot cycle to bridge test, Michael S. Tsirkin, 2023/01/30
- [PULL 55/56] Revert "vhost-user: Introduce nested event loop in vhost_user_read()", Michael S. Tsirkin, 2023/01/30
- [PULL 45/56] tests: acpi: whitelist DSDT blobs before removing dynamic _DSM on coldplugged bridges, Michael S. Tsirkin, 2023/01/30
- [PULL 37/56] x86: pcihp: acpi: prepare slot ignore rule to work with self describing bridges,
Michael S. Tsirkin <=
- [PULL 46/56] pcihp: acpi: ignore coldplugged bridges when composing hotpluggable slots, Michael S. Tsirkin, 2023/01/30
- [PULL 25/56] tests: boot_sector_test(): make it multi-shot, Michael S. Tsirkin, 2023/01/30
- [PULL 43/56] pcihp: acpi: decouple hotplug and generic slots description, Michael S. Tsirkin, 2023/01/30
- [PULL 40/56] pci: make sure pci_bus_is_express() won't error out with "discards ‘const’ qualifier", Michael S. Tsirkin, 2023/01/30
- [PULL 32/56] pcihp: do not put empty PCNT in DSDT, Michael S. Tsirkin, 2023/01/30
- [PULL 34/56] whitelist DSDT before adding endpoint devices to bridge testcases, Michael S. Tsirkin, 2023/01/30
- [PULL 36/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30
- [PULL 39/56] pcihp: make bridge describe itself using AcpiDevAmlIfClass:build_dev_aml, Michael S. Tsirkin, 2023/01/30
- [PULL 53/56] tests/qtest/bios-tables-test: Make the test less verbose by default, Michael S. Tsirkin, 2023/01/30
- [PULL 47/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30