Skip to content

pci(pc/q35): acpi-index support on non-hotpluggable slots

Igor Mammedov qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest34 patches 1 replyIn review
  2. v133 patches 12 repliesSuperseded

Changes in v2 from the cover letter

* rebase on top mst's pull request
* revert
3aa50aa253 ("tests/qtest: Check for devices in bios-tables-test")
which broke acpi tables test and rebuild due to skipping some tests even thought none of devices tests depend on weren't disabled that resulted in stale expected tables and merge conflicts.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/34Revert "tests/qtest: Check for devices in bios-tables-test"tests/qtest/bios-tables-test.c+4 -711 reply
2/34tests: acpi: whitelist new q35.noacpihp test and pc.hpbrroottests/data/acpi/q35/DSDT.noacpihp tests/qtest/bios-tables-test-allowed-diff.h+2 -00 replies
3/34tests: acpi: add test_acpi_q35_tcg_no_acpi_hotplug test and extend test_acpi_piix4_no_acpi_pci_hotplugtests/qtest/bios-tables-test.c+39 -30 replies
4/34tests: acpi: update expected blobstests/data/acpi/pc/DSDT.hpbrroot tests/data/acpi/q35/DSDT.noacpihp tests/qtest/bios-tables-test-allowed-diff.h+0 -20 replies
5/34tests: acpi: whitelist q35/DSDT.multi-bridge before extending testcasetests/qtest/bios-tables-test-allowed-diff.h+1 -00 replies
6/34tests: acpi: extend multi-bridge case with case 'root-port, id=HOHP, hotplug=off root-port, bus=NOHP'tests/qtest/bios-tables-test.c+4 -10 replies
7/34x86: pcihp: fix missing PCNT callchain when intermediate root-port has 'hotplug=off' sethw/i386/acpi-build.c+13 -90 replies
8/34tests: acpi: whitelist pc/DSDT.hpbrroot and pc/DSDT.hpbridge teststests/qtest/bios-tables-test-allowed-diff.h+3 -00 replies
9/34x86: pcihp: fix missing bridge AML when intermediate root-port has 'hotplug=off' sethw/acpi/pci-bridge.c+1 -10 replies
10/34tests: acpi: update expected blobstests/data/acpi/pc/DSDT.hpbridge tests/data/acpi/pc/DSDT.hpbrroot tests/data/acpi/q35/DSDT.multi-bridge +2 more+0 -40 replies
11/34pcihp: piix4: do not redirect hotplug controller to piix4 when ACPI hotplug is disabledhw/acpi/piix4.c+1 -10 replies
12/34pci: fix 'hotplugglable' property behaviorhw/pci/pcie_port.c include/hw/hotplug.h include/hw/qdev-core.h+22 -10 replies
13/34tests: acpi: whitelist DSDT blobs before isolating PCI _DSM func 0 prologtests/qtest/bios-tables-test-allowed-diff.h+35 -00 replies
14/34pcihp: move PCI _DSM function 0 prolog into separate functionhw/i386/acpi-build.c+30 -240 replies
15/34tests: acpi: update expected blobstests/data/acpi/pc/DSDT tests/data/acpi/pc/DSDT.acpierst tests/data/acpi/pc/DSDT.acpihmat +33 more+0 -350 replies
16/34tests: acpi: whitelist DSDT before adding EDSM methodtests/qtest/bios-tables-test-allowed-diff.h+37 -00 replies
17/34acpi: pci: add EDSM method to DSDThw/i386/acpi-build.c+54 -00 replies
18/34tests: acpi: update expected blobstests/data/acpi/pc/DSDT tests/data/acpi/pc/DSDT.acpierst tests/data/acpi/pc/DSDT.acpihmat +35 more+0 -370 replies
19/34tests: acpi: whitelist DSDT before adding device with acpi-index to testcasestests/qtest/bios-tables-test-allowed-diff.h+3 -00 replies
20/34tests: acpi: add device with acpi-index on non-hotpluggble bustests/qtest/bios-tables-test.c+1 -00 replies
21/34acpi: pci: support acpi-index for non-hotpluggable deviceshw/i386/acpi-build.c+25 -00 replies
22/34tests: acpi: update expected blobstests/data/acpi/pc/DSDT.hpbrroot tests/data/acpi/q35/DSDT.multi-bridge tests/data/acpi/q35/DSDT.noacpihp +1 more+0 -30 replies
23/34tests: acpi: whitelist DSDT before exposing non zero functionstests/qtest/bios-tables-test-allowed-diff.h+37 -00 replies
24/34acpi: pci: describe all functions on populated slotshw/i386/acpi-build.c+0 -60 replies
25/34tests: acpi: update expected blobstests/data/acpi/pc/DSDT tests/data/acpi/pc/DSDT.acpierst tests/data/acpi/pc/DSDT.acpihmat +35 more+0 -370 replies
26/34tests: acpi: whitelist DSDT before adding non-0 function device with acpi-index to testcasestests/qtest/bios-tables-test-allowed-diff.h+2 -00 replies
27/34tests: acpi: add non zero function device with acpi-index on non-hotpluggble bustests/qtest/bios-tables-test.c+4 -20 replies
28/34tests: acpi: update expected blobstests/data/acpi/q35/DSDT.multi-bridge tests/data/acpi/q35/DSDT.noacpihp tests/qtest/bios-tables-test-allowed-diff.h+0 -20 replies
29/34pci: move acpi-index uniqueness check to generic PCI device codehw/acpi/pcihp.c hw/pci/pci.c+57 -560 replies
30/34acpi: pci: drop BSEL usage when deciding that device isn't hotpluggablehw/i386/acpi-build.c+1 -10 replies
31/34acpi: pci: move BSEL into build_append_pcihp_slots()hw/i386/acpi-build.c+6 -90 replies
32/34acpi: pci: move out ACPI PCI hotplug generator from generic slot generator build_append_pci_bus_devices()hw/acpi/pci-bridge.c hw/i386/acpi-build.c include/hw/acpi/pcihp.h+17 -60 replies
33/34pcihp: move fields enabling hotplug into AcpiPciHpStatehw/acpi/acpi-pci-hotplug-stub.c hw/acpi/ich9.c hw/acpi/pcihp.c +3 more+34 -350 replies
34/34pcihp: add ACPI PCI hotplug specific is_hotpluggable_bus() callbackhw/acpi/acpi-pci-hotplug-stub.c hw/acpi/ich9.c hw/acpi/pcihp.c +4 more+39 -240 replies

Reviews trailers per patch

1 of 34 patches has a Reviewed-by or Acked-by.

PatchFabiano Rosas
1/34A-b
2/34
3/34
4/34
5/34
6/34
7/34
8/34
9/34
10/34
11/34
12/34
13/34
14/34
15/34
16/34
17/34
18/34
19/34
20/34
21/34
22/34
23/34
24/34
25/34
26/34
27/34
28/34
29/34
30/34
31/34
32/34
33/34
34/34

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/34] pci(pc/q35): acpi-index support on non-hotpluggable slots

Changelog:
v2:
* rebase on top mst's pull request
* revert
3aa50aa253 ("tests/qtest: Check for devices in bios-tables-test")
which broke acpi tables test and rebuild due to skipping some tests even thought none of devices tests depend on weren't disabled that resulted in stale expected tables and merge conflicts.

Series extends acpi-index support to host-bridge(s) and bridges with disabled hotplug (either explicitly or implicitly).
Whats new (it is still limited to 'pc' and 'q35' machines), acpi-index now works for non-hotpluggable slots/nics:
* q35: host-bridge
* pc: host-bridge with disabled hotplug 'PIIX4_PM.acpi-root-pci-hotplug=off'
* non-hotpluggable multifunction nics
* on non-hotpluggable slots with native hotplug (i.e. without ACPI PCI hotplug) PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off
+ pcie-root-port,hotplug=off | pci-bridge,shpc=off

where it doesn't work (and never will):
* on hotplugged ports/bridges
* on hotpluggable ports/bridges with native hotplug

1-12/34: fixes for bugs or odd behavior
14-24/34: non-hotplug/multifunction acpi-index enabling 29-34/34: cleanups
all of that is peppered by extra acpi tests or extensions to existing ones

Somewhat tested with RHEL9.0 and WS2022.

What's in queue:
* PXB support
* microvm and arm/virt support
all of above only for non-hotpluggable slots as I don't really want to pull there complicated APCI PCI hotplug.

gitlab tree: https://gitlab.com/imammedo/qemu/-/tree/acpi_index_non_hotplug_v2

Igor Mammedov (34):
Revert "tests/qtest: Check for devices in bios-tables-test"
tests: acpi: whitelist new q35.noacpihp test and pc.hpbrroot
tests: acpi: add test_acpi_q35_tcg_no_acpi_hotplug test and extend
test_acpi_piix4_no_acpi_pci_hotplug
tests: acpi: update expected blobs
tests: acpi: whitelist q35/DSDT.multi-bridge before extending testcase
tests: acpi: extend multi-bridge case with case
'root-port,id=HOHP,hotplug=off root-port,bus=NOHP'
x86: pcihp: fix missing PCNT callchain when intermediate root-port has
'hotplug=off' set
tests: acpi: whitelist pc/DSDT.hpbrroot and pc/DSDT.hpbridge tests
x86: pcihp: fix missing bridge AML when intermediate root-port has
'hotplug=off' set
tests: acpi: update expected blobs
pcihp: piix4: do not redirect hotplug controller to piix4 when ACPI
hotplug is disabled
pci: fix 'hotplugglable' property behavior
tests: acpi: whitelist DSDT blobs before isolating PCI _DSM func 0
prolog
pcihp: move PCI _DSM function 0 prolog into separate function
tests: acpi: update expected blobs
tests: acpi: whitelist DSDT before adding EDSM method
acpi: pci: add EDSM method to DSDT
tests: acpi: update expected blobs
tests: acpi: whitelist DSDT before adding device with acpi-index to
testcases
tests: acpi: add device with acpi-index on non-hotpluggble bus
acpi: pci: support acpi-index for non-hotpluggable devices
tests: acpi: update expected blobs
tests: acpi: whitelist DSDT before exposing non zero functions
acpi: pci: describe all functions on populated slots
tests: acpi: update expected blobs
tests: acpi: whitelist DSDT before adding non-0 function device with
acpi-index to testcases
tests: acpi: add non zero function device with acpi-index on
non-hotpluggble bus
tests: acpi: update expected blobs
pci: move acpi-index uniqueness check to generic PCI device code
acpi: pci: drop BSEL usage when deciding that device isn't
hotpluggable
acpi: pci: move BSEL into build_append_pcihp_slots()
acpi: pci: move out ACPI PCI hotplug generator from generic slot
generator build_append_pci_bus_devices()
pcihp: move fields enabling hotplug into AcpiPciHpState
pcihp: add ACPI PCI hotplug specific is_hotpluggable_bus() callback

 include/hw/acpi/ich9.h                        |   1 +
 include/hw/acpi/pcihp.h                       |  11 +-
 include/hw/acpi/piix4.h                       |   2 -
 include/hw/hotplug.h                          |   2 +
 include/hw/qdev-core.h                        |  13 +-
 hw/acpi/acpi-pci-hotplug-stub.c               |   9 +-
 hw/acpi/ich9.c                                |  21 +-
 hw/acpi/pci-bridge.c                          |  14 +-
 hw/acpi/pcihp.c                               | 112 +++--------
 hw/acpi/piix4.c                               |  33 ++--
 hw/i386/acpi-build.c                          | 179 +++++++++++++-----
 hw/isa/lpc_ich9.c                             |   1 +
 hw/pci/pci.c                                  |  57 ++++++
 hw/pci/pcie_port.c                            |   8 +
 tests/data/acpi/pc/DSDT                       | Bin 6360 -> 6488 bytes
 tests/data/acpi/pc/DSDT.acpierst              | Bin 6283 -> 6411 bytes
 tests/data/acpi/pc/DSDT.acpihmat              | Bin 7685 -> 7813 bytes
 tests/data/acpi/pc/DSDT.bridge                | Bin 12487 -> 12615 bytes
 tests/data/acpi/pc/DSDT.cphp                  | Bin 6824 -> 6952 bytes
 tests/data/acpi/pc/DSDT.dimmpxm               | Bin 8014 -> 8142 bytes
 tests/data/acpi/pc/DSDT.hpbridge              | Bin 6289 -> 6451 bytes
 tests/data/acpi/pc/DSDT.hpbrroot              | Bin 3081 -> 3343 bytes
 tests/data/acpi/pc/DSDT.ipmikcs               | Bin 6432 -> 6560 bytes
 tests/data/acpi/pc/DSDT.memhp                 | Bin 7719 -> 7847 bytes
 tests/data/acpi/pc/DSDT.nohpet                | Bin 6218 -> 6346 bytes
 tests/data/acpi/pc/DSDT.numamem               | Bin 6366 -> 6494 bytes
 tests/data/acpi/pc/DSDT.roothp                | Bin 9745 -> 9873 bytes
 tests/data/acpi/q35/DSDT                      | Bin 8252 -> 8361 bytes
 tests/data/acpi/q35/DSDT.acpierst             | Bin 8269 -> 8378 bytes
 tests/data/acpi/q35/DSDT.acpihmat             | Bin 9577 -> 9686 bytes
 tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 8531 -> 8640 bytes
 tests/data/acpi/q35/DSDT.applesmc             | Bin 8298 -> 8407 bytes
 tests/data/acpi/q35/DSDT.bridge               | Bin 11481 -> 11590 bytes
 tests/data/acpi/q35/DSDT.core-count2          | Bin 32392 -> 32501 bytes
 tests/data/acpi/q35/DSDT.cphp                 | Bin 8716 -> 8825 bytes
 tests/data/acpi/q35/DSDT.cxl                  | Bin 9564 -> 9673 bytes
 tests/data/acpi/q35/DSDT.dimmpxm              | Bin 9906 -> 10015 bytes
 tests/data/acpi/q35/DSDT.ipmibt               | Bin 8327 -> 8436 bytes
 tests/data/acpi/q35/DSDT.ipmismbus            | Bin 8340 -> 8449 bytes
 tests/data/acpi/q35/DSDT.ivrs                 | Bin 8269 -> 8378 bytes
 tests/data/acpi/q35/DSDT.memhp                | Bin 9611 -> 9720 bytes
 tests/data/acpi/q35/DSDT.mmio64               | Bin 9382 -> 9491 bytes
 tests/data/acpi/q35/DSDT.multi-bridge         | Bin 12337 -> 12770 bytes
 tests/data/acpi/q35/DSDT.noacpihp             | Bin 0 -> 8248 bytes
 tests/data/acpi/q35/DSDT.nohpet               | Bin 8110 -> 8219 bytes
 tests/data/acpi/q35/DSDT.numamem              | Bin 8258 -> 8367 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa          | Bin 8353 -> 8462 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12            | Bin 8858 -> 8967 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2             | Bin 8884 -> 8993 bytes
 tests/data/acpi/q35/DSDT.viot                 | Bin 9361 -> 9470 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35615 -> 35724 bytes
 tests/qtest/bios-tables-test.c                | 125 +++++-------
 52 files changed, 345 insertions(+), 243 deletions(-)
 create mode 100644 tests/data/acpi/q35/DSDT.noacpihp
Signature · 1 line
2.39.1