Skip to contentSkip to conversation

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

PATCH Superseded Igor Mammedov 4 participants 46 messages Feb 24, 2023 – Mar 6, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

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-11/33: fixes for bugs or odd behavior
13-23/33: non-hotplug/multifunction acpi-index enabling 28-33/33: 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
CI: https://gitlab.com/imammedo/qemu/-/pipelines/787263630
it's red but only due to unrelated curl breakage in msys* targets, the rest is green

Igor Mammedov (33):
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 9578 -> 9687 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 -> 9486 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35615 -> 35724 bytes
 tests/qtest/bios-tables-test.c                |  50 ++++-
 52 files changed, 341 insertions(+), 172 deletions(-)
 create mode 100644 tests/data/acpi/q35/DSDT.noacpihp
Signature · 1 line
2.39.1
#1 lore raw

PATCH 1/33 tests: acpi: whitelist new q35.noacpihp test and pc.hpbrroot

for q35.noacpihp use plain default Q35 DSDT table as a starting point.

---
 tests/qtest/bios-tables-test-allowed-diff.h |   2 ++
 tests/data/acpi/q35/DSDT.noacpihp           | Bin 0 -> 8252 bytes
 2 files changed, 2 insertions(+)
 create mode 100644 tests/data/acpi/q35/DSDT.noacpihp
tests/qtest/bios-tables-test-allowed-diff.h +2 -0
index dfb8523c8b..b2c5312871 100644
@@ -1 +1,3 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/pc/DSDT.hpbrroot",
+"tests/data/acpi/q35/DSDT.noacpihp",
tests/data/acpi/q35/DSDT.noacpihp new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..d68c472b460e4609a64ea67de3c4cebfca76164d
GIT binary patch
Signature · 1 line
2.39.1
#2 lore raw

PATCH 2/33 tests: acpi: add test_acpi_q35_tcg_no_acpi_hotplug test and extend test_acpi_piix4_no_acpi_pci_hotplug

In reply to Igor Mammedov

test bridge AML generator with ACPI PCI hotplug disabled (i.e. with native hotplug enabled/disabled per bridge/root port)

PS:
while at make sure that devices on pci-bridge are starting from addr=1.0 as slot 0 is not available there and test passes only because of a bug in ACPI hotplug that will be fixed by follow up patch

---
 tests/qtest/bios-tables-test.c | 42 +++++++++++++++++++++++++++++++---
 1 file changed, 39 insertions(+), 3 deletions(-)
tests/qtest/bios-tables-test.c +39 -3
index d29a4e47af..5128b62634 100644
@@ -949,9 +949,14 @@ static void test_acpi_piix4_no_acpi_pci_hotplug(void)
     data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
     test_acpi_one("-global PIIX4_PM.acpi-root-pci-hotplug=off "
                   "-global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off "
-                  "-device pci-bridge,chassis_nr=1 "
-                  "-device pci-testdev,bus=pci.0 "
-                  "-device pci-testdev,bus=pci.1", &data);
+                  "-device pci-bridge,chassis_nr=1,addr=4.0 "
+                  "-device pci-testdev,bus=pci.0,addr=5.0 "
+                  "-device pci-testdev,bus=pci.0,addr=6.0,acpi-index=101 "
+                  "-device pci-testdev,bus=pci.1,addr=1.0 "
+                  "-device pci-testdev,bus=pci.1,addr=2.0,acpi-index=201 "
+                  "-device pci-bridge,id=nhpbr,chassis_nr=2,shpc=off,addr=7.0 "
+                  "-device pci-testdev,bus=nhpbr,addr=1.0,acpi-index=301 "
+                  , &data);
     free_test_data(&data);
 }
 
@@ -1002,6 +1007,35 @@ static void test_acpi_q35_tcg_bridge(void)
     free_test_data(&data);
 }
 
+static void test_acpi_q35_tcg_no_acpi_hotplug(void)
+{
+    test_data data;
+
+    memset(&data, 0, sizeof(data));
+    data.machine = MACHINE_Q35;
+    data.variant = ".noacpihp";
+    data.required_struct_types = base_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
+    test_acpi_one("-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off"
+        " -device pci-testdev,bus=pcie.0,acpi-index=101,addr=3.0"
+        " -device pci-bridge,chassis_nr=1,id=shpcbr,addr=4.0"
+        " -device pci-testdev,bus=shpcbr,addr=1.0,acpi-index=201"
+        " -device pci-bridge,chassis_nr=2,shpc=off,id=noshpcbr,addr=5.0"
+        " -device pci-testdev,bus=noshpcbr,addr=1.0,acpi-index=301"
+        " -device pcie-root-port,id=hprp,port=0x0,chassis=1,addr=6.0"
+        " -device pci-testdev,bus=hprp,acpi-index=401"
+        " -device pcie-root-port,id=nohprp,port=0x0,chassis=2,hotplug=off,"
+                                 "addr=7.0"
+        " -device pci-testdev,bus=nohprp,acpi-index=501"
+        " -device pcie-root-port,id=nohprpint,port=0x0,chassis=3,hotplug=off,"
+                                 "addr=8.0"
+        " -device pcie-root-port,id=hprp2,port=0x0,chassis=4,bus=nohprpint,"
+                                 "addr=9.0"
+        " -device pci-testdev,bus=hprp2,acpi-index=601"
+        , &data);
+    free_test_data(&data);
+}
+
 static void test_acpi_q35_multif_bridge(void)
 {
     test_data data = {
@@ -2161,6 +2195,8 @@ int main(int argc, char *argv[])
                                test_acpi_q35_tcg_tpm12_tis);
             }
             qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge);
+            qtest_add_func("acpi/q35/no-acpi-hotplug",
+                           test_acpi_q35_tcg_no_acpi_hotplug);
             qtest_add_func("acpi/q35/multif-bridge",
                            test_acpi_q35_multif_bridge);
             qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64);
Signature · 1 line
2.39.1
#3 lore raw

PATCH 3/33 tests: acpi: update expected blobs

In reply to Igor Mammedov

expected changes:
Basically adds devices present on root bus in form:
Device (SXX)

  {
     Name (_ADR, 0xYYYYYYYY)  // _ADR: Address

}

On top of that For q35.noacpihp, all ACPI PCI hotplug AML is removed and _OSC get native hotplug enabled:

                       CreateDWordField (Arg3, 0x04, CDW2)
                       CreateDWordField (Arg3, 0x08, CDW3)
                       Local0 = CDW3 /* \_SB_.PCI0._OSC.CDW3 */
  -                    Local0 &= 0x1E
  +                    Local0 &= 0x1F
                       If ((Arg1 != One))
                       {
                           CDW1 |= 0x08
---
 tests/qtest/bios-tables-test-allowed-diff.h |   2 --
 tests/data/acpi/pc/DSDT.hpbrroot            | Bin 3081 -> 3115 bytes
 tests/data/acpi/q35/DSDT.noacpihp           | Bin 8252 -> 7932 bytes
 3 files changed, 2 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -2
index b2c5312871..dfb8523c8b 100644
@@ -1,3 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/DSDT.hpbrroot",
-"tests/data/acpi/q35/DSDT.noacpihp",
tests/data/acpi/pc/DSDT.hpbrroot binary +0 -0
index a71ed4fbaa14be655c28a5e03e50157b4476e480..d77752960285a5afa6d0c0a04e400842f6acd2ed 100644
GIT binary patch
tests/data/acpi/q35/DSDT.noacpihp binary +0 -0
index d68c472b460e4609a64ea67de3c4cebfca76164d..f35338db30a44638cc3a55d2870e0e377af4246f 100644
GIT binary patch
Signature · 1 line
2.39.1
#4 lore raw

PATCH 4/33 tests: acpi: whitelist q35/DSDT.multi-bridge before extending testcase

In reply to Igor Mammedov
---
 tests/qtest/bios-tables-test-allowed-diff.h | 1 +
 1 file changed, 1 insertion(+)
tests/qtest/bios-tables-test-allowed-diff.h +1 -0
index dfb8523c8b..dabc024f53 100644
@@ -1 +1,2 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/q35/DSDT.multi-bridge",
Signature · 1 line
2.39.1
#5 lore raw

PATCH 5/33 tests: acpi: extend multi-bridge case with case 'root-port, id=HOHP, hotplug=off root-port, bus=NOHP'

In reply to Igor Mammedov

Following corner case wasn't covered:

-device pcie-root-port,id=NO_HOTPLUG,hotplug=off -device pcie-root-port,bus=NO_HOTPLUG

when intermediate root-port has explicitly disabled hotplug, all hierarchy below it is not described anymore (used to be described in 7.2)

So as result we see only NO_HOTPLUG root-port described

+ Device (S50)
+ {
+ Name (_ADR, 0x000A0000) // _ADR: Address
+ }

and no children nor notification chain for them are being composed. Follow up patches will fix missing leaf root-port descriptor and notification chain that should accompany it.

---
 tests/qtest/bios-tables-test.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/qtest/bios-tables-test.c +4 -1
index 5128b62634..638a193e13 100644
@@ -1061,7 +1061,10 @@ static void test_acpi_q35_multif_bridge(void)
         " -device pci-testdev,bus=pcie.0,addr=2.4"
         " -device pci-testdev,bus=pcie.0,addr=5.0"
         " -device pci-testdev,bus=rp0,addr=0.0"
-        " -device pci-testdev,bus=br1", &data);
+        " -device pci-testdev,bus=br1"
+        " -device pcie-root-port,id=rpnohp,chassis=8,addr=0xA.0,hotplug=off"
+        " -device pcie-root-port,id=rp3,chassis=9,bus=rpnohp"
+        , &data);
 
     /* hotplugged bridges section */
     qtest_qmp_device_add(data.qts, "pci-bridge", "hpbr1",
Signature · 1 line
2.39.1
#6 lore raw

PATCH 6/33 x86: pcihp: fix missing PCNT callchain when intermediate root-port has 'hotplug=off' set

In reply to Igor Mammedov

Beside BSEL numbers change (due to 2 extra root-ports in q35/miltibridge test), following change is expected:

       Scope (\_SB.PCI0)
       {
  ...
  +        Scope (S50)
  +        {
  +            Scope (S00)
  +            {
  +                Method (PCNT, 0, NotSerialized)
  +                {
  +                    BNUM = Zero
  +                    DVNT (PCIU, One)
  +                    DVNT (PCID, 0x03)
  +                }
  +            }
  +
  +            Method (PCNT, 0, NotSerialized)
  +            {
  +                ^S00.PCNT
  +            }
  +        }
  ...
           Method (PCNT, 0, NotSerialized)
           {
  +            ^S50.PCNT ()
               ^S13.PCNT ()
               ^S12.PCNT ()
               ^S11.PCNT ()

I practice [1] hasn't broke anything since on hardware side we unset hotplug_handler on such intermediate port => hotplug behind it has not been properly wired and as result not worked.

1)

Fixes ddab4d3fae4e8 ("pcihp: compose PCNT callchain right before its user _GPE._E01")
---
 hw/i386/acpi-build.c | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
hw/i386/acpi-build.c +13 -9
index b67dcbbb37..c0674ae2d1 100644
@@ -516,16 +516,24 @@ static bool build_append_notfication_callback(Aml *parent_scope,
     PCIBus *sec;
     QObject *bsel;
     int nr_notifiers = 0;
+    GQueue *pcnt_bus_list = g_queue_new();
 
     QLIST_FOREACH(sec, &bus->child, sibling) {
         Aml *br_scope = aml_scope("S%.02X", sec->parent_dev->devfn);
-        if (pci_bus_is_root(sec) ||
-            !object_property_find(OBJECT(sec), ACPI_PCIHP_PROP_BSEL)) {
+        if (pci_bus_is_root(sec)) {
             continue;
         }
         nr_notifiers = nr_notifiers +
                        build_append_notfication_callback(br_scope, sec);
-        aml_append(parent_scope, br_scope);
+        /*
+         * add new child scope to parent
+         * and keep track of bus that have PCNT,
+         * bus list is used later to call children PCNTs from this level PCNT
+         */
+        if (nr_notifiers) {
+            g_queue_push_tail(pcnt_bus_list, sec);
+            aml_append(parent_scope, br_scope);
+        }
     }
 
     /*
@@ -549,17 +557,13 @@ static bool build_append_notfication_callback(Aml *parent_scope,
     }
 
     /* Notify about child bus events in any case */
-    QLIST_FOREACH(sec, &bus->child, sibling) {
-        if (pci_bus_is_root(sec) ||
-            !object_property_find(OBJECT(sec), ACPI_PCIHP_PROP_BSEL)) {
-            continue;
-        }
-
+    while ((sec = g_queue_pop_head(pcnt_bus_list))) {
         aml_append(method, aml_name("^S%.02X.PCNT", sec->parent_dev->devfn));
     }
 
     aml_append(parent_scope, method);
     qobject_unref(bsel);
+    g_queue_free(pcnt_bus_list);
     return !!nr_notifiers;
 }
 
Signature · 1 line
2.39.1
#7 lore raw

PATCH 7/33 tests: acpi: whitelist pc/DSDT.hpbrroot and pc/DSDT.hpbridge tests

In reply to Igor Mammedov

follow up fix for missing root-port AML will affect these tests by adding non-hotpluggable Device descriptors of colplugged bridges when bridge hotplug is disabled.

---
 tests/qtest/bios-tables-test-allowed-diff.h | 3 +++
 1 file changed, 3 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +3 -0
index dabc024f53..a0dbb28cde 100644
@@ -1,2 +1,5 @@
 /* List of comma-separated changed AML files to ignore */
 "tests/data/acpi/q35/DSDT.multi-bridge",
+"tests/data/acpi/pc/DSDT.hpbridge",
+"tests/data/acpi/pc/DSDT.hpbrroot",
+"tests/data/acpi/q35/DSDT.noacpihp",
Signature · 1 line
2.39.1
#8 lore raw

PATCH 8/33 x86: pcihp: fix missing bridge AML when intermediate root-port has 'hotplug=off' set

In reply to Igor Mammedov

(I practice [1] hasn't broke anything since on hardware side we unset hotplug_handler on such intermediate port => hotplug behind it has never worked)

When deciding if bridge should be described, the original condition was

  cold_plugged_bridge && pcihp_bridge_en

which was replaced [1] by

bridge has ACPI_PCIHP_PROP_BSEL

the later however is not the same thing as the original and flips to false if intermediate bridge has hotplug turned off (root-port with 'hotplug=off' option).

Since we already in build_pci_bridge_aml(), the question if it's bridge is answered. Use DeviceState::hotplugged to make decision if bridge should describe its slots.

What's left out is pcihp_bridge_en, which tells us if ACPI bridge hotplug is enabled.

With hotplug and non hotplug part now being mostly separated, omitting this check will only lead to colplugged bridges describe occupied slots in case when ACPI bridge hotplug is disabled.
Which makes behavior consistent with occupied slots on hostbridge.

Ex (pc/DSDT.hpbrroot diff):
...

               Device (S20)
               {
                   Name (_ADR, 0x00040000)  // _ADR: Address
  +                Device (S08)
  +                {
  +                    Name (_ADR, 0x00010000)  // _ADR: Address
  +                }
  +
  +                Device (S10)
  +                {
  +                    Name (_ADR, 0x00020000)  // _ADR: Address
  +                }
               }

...

PS:
testing shows that above doesn't affect adversely guest OS
behavior: i.e. if ACPI bridge hotplug is enabled it's expected behaviour, and with ACPI bridge hotplug is disabled (a.k. native hotplug), it doesn't break slot enumeration nor native hotplug. (tested with RHEL9.0 and WS2022).

1)

Fixes 6c36ec46b0d ("pcihp: make bridge describe itself using AcpiDevAmlIfClass:build_dev_aml")
---
 hw/acpi/pci-bridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/acpi/pci-bridge.c +1 -1
index 5f3ee5157f..4fbf6da6ad 100644
@@ -21,7 +21,7 @@ void build_pci_bridge_aml(AcpiDevAmlIf *adev, Aml *scope)
 {
     PCIBridge *br = PCI_BRIDGE(adev);
 
-    if (object_property_find(OBJECT(&br->sec_bus), ACPI_PCIHP_PROP_BSEL)) {
+    if (!DEVICE(br)->hotplugged) {
         build_append_pci_bus_devices(scope, pci_bridge_get_sec_bus(br));
     }
 }
Signature · 1 line
2.39.1
#9 lore raw

PATCH 9/33 tests: acpi: update expected blobs

In reply to Igor Mammedov

BNUM numbering changes across DSDT due to addition of new bridges.

Fixed missing PCI tree brunch (q35/DSDT.multi-bridge case):

// -device pcie-root-port,id=rpnohp,chassis=8,addr=0xA.0,hotplug=off
+ Device (S50)
+ {
+ Name (_ADR, 0x000A0000) // _ADR: Address
// -device pcie-root-port,id=rp3,chassis=9,bus=rpnohp
+ Device (S00)
+ {

  +                    Name (_ADR, Zero)  // _ADR: Address
  +                    Name (BSEL, Zero)
  +                    Device (S00)
  +                    {
  +                        Name (_ADR, Zero)  // _ADR: Address
  +                        Name (ASUN, Zero)
  +                        Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
  +                        {
  +                            Local0 = Package (0x02)
  +                                {
  +                                    BSEL,
  +                                    ASUN
  +                                }
  +                            Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
  +                        }
  +
  +                        Name (_SUN, Zero)  // _SUN: Slot User Number
  +                        Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
  +                        {

+ PCEJ (BSEL, _SUN)
+ }
+ }
+
+ Method (DVNT, 2, NotSerialized)
+ {
+ If ((Arg0 & One))
+ {
+ Notify (S00, Arg1)
+ }
+ }
+ }
+ }

Fixed hotplug notification for leaf root port (hotplug=on) attached to intermediate root port (hotplug=off) (q35/DSDT.multi-bridge case)

// -device pcie-root-port,id=rpnohp,chassis=8,addr=0xA.0,hotplug=off
+ Scope (S50)
+ {
// -device pcie-root-port,id=rp3,chassis=9,bus=rpnohp
+ Scope (S00)
+ {
+ Method (PCNT, 0, NotSerialized)
+ {

  +                    BNUM = Zero
  +                    DVNT (PCIU, One)
  +                    DVNT (PCID, 0x03)
  +                }
  +            }
  +
  +            Method (PCNT, 0, NotSerialized)
  +            {
  +                ^S00.PCNT ()
  +            }
  +        }
  ...
           Method (PCNT, 0, NotSerialized)
           {
  +            ^S50.PCNT ()
               ^S13.PCNT ()

Populated slots being described on coldplugged bridges even if ACPI bridge hotplug is disabled.
(pc/DSDT.hpbridge and pc/DSDT.hpbrroot)
...

               Device (S18)
               {
                   Name (_ADR, 0x00030000)  // _ADR: Address
  +                Device (S08)
  +                {
  +                    Name (_ADR, 0x00010000)  // _ADR: Address
  +                }
  +
  +                Device (S10)
  +                {
  +                    Name (_ADR, 0x00020000)  // _ADR: Address
  +                }
               }
  ...
               Device (S18)
               {
                   Name (_ADR, 0x00030000)  // _ADR: Address
  +                Device (S00)
  +                {
  +                    Name (_ADR, Zero)  // _ADR: Address
  +                }
               }
---
 tests/qtest/bios-tables-test-allowed-diff.h |   4 ----
 tests/data/acpi/pc/DSDT.hpbridge            | Bin 6289 -> 6323 bytes
 tests/data/acpi/pc/DSDT.hpbrroot            | Bin 3115 -> 3166 bytes
 tests/data/acpi/q35/DSDT.multi-bridge       | Bin 12337 -> 12545 bytes
 tests/data/acpi/q35/DSDT.noacpihp           | Bin 7932 -> 8022 bytes
 5 files changed, 4 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -4
index a0dbb28cde..dfb8523c8b 100644
@@ -1,5 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/pc/DSDT.hpbridge",
-"tests/data/acpi/pc/DSDT.hpbrroot",
-"tests/data/acpi/q35/DSDT.noacpihp",
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
index 834c27002edbd3e2298a71c9ff1b501e3a3314f7..5dea100bc9492bb2367aac8660522201785c1efb 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbrroot binary +0 -0
index d77752960285a5afa6d0c0a04e400842f6acd2ed..893ab221c2cca1829937a4c26152680313633df4 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index 66b39be294a261a6bd991c6bcbd8e2a04a03403f..f2f60fdbb3b44ab9adb69bb36e4a80978536af9b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.noacpihp binary +0 -0
index f35338db30a44638cc3a55d2870e0e377af4246f..4ea982de2df3cf7cd89cb3b4467a350eaf8f5d29 100644
GIT binary patch
Signature · 1 line
2.39.1
#10 lore raw

PATCH 10/33 pcihp: piix4: do not redirect hotplug controller to piix4 when ACPI hotplug is disabled

In reply to Igor Mammedov

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)
---
 hw/acpi/piix4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/acpi/piix4.c +1 -1
index eac2125abd..8fc422829a 100644
@@ -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;
Signature · 1 line
2.39.1
#11 lore raw

PATCH 11/33 pci: fix 'hotplugglable' property behavior

In reply to Igor Mammedov

Currently the property may flip its state during VM bring up or just doesn't work as the name implies.

In particular with PCIE root port that has 'hotplug={on|off}' property, and when it's turned off, one would expect
'hotpluggable' == false
for any devices attached to it.
Which is not the case since qbus_is_hotpluggable() used by the property just checks for presence of any hotplug_handler set on bus.

The problem is that name BusState::hotplug_handler from its inception is misnomer, as it handles not only hotplug but also in many cases coldplug as well (i.e. generic wiring interface), and it's fine to have hotplug_handler set on bus while it doesn't support hotplug (ex. pcie-slot with hotplug=off).

Another case of root port flipping 'hotpluggable' state when ACPI PCI hotplug is enabled in this case root port with 'hotplug=off' starts as hotpluggable and then later on, pcihp hotplug_handler clears hotplug_handler explicitly after checking root port's 'hotplug' property.

So root-port hotpluggablity check sort of works if pcihp is enabled but is broken if pcihp is disabled.

One way to deal with the issue is to ask hotplug_handler if bus it controls is hotpluggable or not. To do that add is_hotpluggable_bus() hook to HotplugHandler interface and use it in 'hotpluggable' property + teach pcie-slot to actually look into 'hotplug' property state before deciding if bus is hotpluggable.

---
 include/hw/hotplug.h   |  2 ++
 include/hw/qdev-core.h | 13 ++++++++++++-
 hw/pci/pcie_port.c     |  8 ++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)
include/hw/hotplug.h +2 -0
index e15f59c8b3..a9840ed485 100644
@@ -48,6 +48,7 @@ typedef void (*hotplug_fn)(HotplugHandler *plug_handler,
  * @unplug: unplug callback.
  *          Used for device removal with devices that implement
  *          asynchronous and synchronous (surprise) removal.
+ * @is_hotpluggable_bus: called to check if bus/its parent allow hotplug on bus
  */
 struct HotplugHandlerClass {
     /* <private> */
@@ -58,6 +59,7 @@ struct HotplugHandlerClass {
     hotplug_fn plug;
     hotplug_fn unplug_request;
     hotplug_fn unplug;
+    bool (*is_hotpluggable_bus)(HotplugHandler *plug_handler, BusState *bus);
 };
 
 /**
include/hw/qdev-core.h +12 -1
index 35fddb19a6..3b3518146b 100644
@@ -812,7 +812,18 @@ void qbus_set_bus_hotplug_handler(BusState *bus);
 
 static inline bool qbus_is_hotpluggable(BusState *bus)
 {
-   return bus->hotplug_handler;
+    HotplugHandler *plug_handler = bus->hotplug_handler;
+    bool ret = !!plug_handler;
+
+    if (plug_handler) {
+        HotplugHandlerClass *hdc;
+
+        hdc = HOTPLUG_HANDLER_GET_CLASS(plug_handler);
+        if (hdc->is_hotpluggable_bus) {
+            ret = hdc->is_hotpluggable_bus(plug_handler, bus);
+        }
+    }
+    return ret;
 }
 
 /**
hw/pci/pcie_port.c +8 -0
index 65a397ad23..000633fec1 100644
@@ -161,6 +161,13 @@ PCIDevice *pcie_find_port_by_pn(PCIBus *bus, uint8_t pn)
     return NULL;
 }
 
+static bool pcie_slot_is_hotpluggbale_bus(HotplugHandler *plug_handler,
+                                          BusState *bus)
+{
+    PCIESlot *s = PCIE_SLOT(bus->parent);
+    return s->hotplug;
+}
+
 static const TypeInfo pcie_port_type_info = {
     .name = TYPE_PCIE_PORT,
     .parent = TYPE_PCI_BRIDGE,
@@ -188,6 +195,7 @@ static void pcie_slot_class_init(ObjectClass *oc, void *data)
     hc->plug = pcie_cap_slot_plug_cb;
     hc->unplug = pcie_cap_slot_unplug_cb;
     hc->unplug_request = pcie_cap_slot_unplug_request_cb;
+    hc->is_hotpluggable_bus = pcie_slot_is_hotpluggbale_bus;
 }
 
 static const TypeInfo pcie_slot_type_info = {
Signature · 1 line
2.39.1
#12 lore raw

PATCH 12/33 tests: acpi: whitelist DSDT blobs before isolating PCI _DSM func 0 prolog

In reply to Igor Mammedov
---
 tests/qtest/bios-tables-test-allowed-diff.h | 35 +++++++++++++++++++++
 1 file changed, 35 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +35 -0
index dfb8523c8b..7e7745db39 100644
@@ -1 +1,36 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/pc/DSDT",
+"tests/data/acpi/pc/DSDT.acpierst",
+"tests/data/acpi/pc/DSDT.acpihmat",
+"tests/data/acpi/pc/DSDT.bridge",
+"tests/data/acpi/pc/DSDT.cphp",
+"tests/data/acpi/pc/DSDT.dimmpxm",
+"tests/data/acpi/pc/DSDT.hpbridge",
+"tests/data/acpi/pc/DSDT.ipmikcs",
+"tests/data/acpi/pc/DSDT.memhp",
+"tests/data/acpi/pc/DSDT.nohpet",
+"tests/data/acpi/pc/DSDT.numamem",
+"tests/data/acpi/pc/DSDT.roothp",
+"tests/data/acpi/q35/DSDT",
+"tests/data/acpi/q35/DSDT.acpierst",
+"tests/data/acpi/q35/DSDT.acpihmat",
+"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
+"tests/data/acpi/q35/DSDT.applesmc",
+"tests/data/acpi/q35/DSDT.bridge",
+"tests/data/acpi/q35/DSDT.core-count2",
+"tests/data/acpi/q35/DSDT.cphp",
+"tests/data/acpi/q35/DSDT.cxl",
+"tests/data/acpi/q35/DSDT.dimmpxm",
+"tests/data/acpi/q35/DSDT.ipmibt",
+"tests/data/acpi/q35/DSDT.ipmismbus",
+"tests/data/acpi/q35/DSDT.ivrs",
+"tests/data/acpi/q35/DSDT.memhp",
+"tests/data/acpi/q35/DSDT.mmio64",
+"tests/data/acpi/q35/DSDT.multi-bridge",
+"tests/data/acpi/q35/DSDT.nohpet",
+"tests/data/acpi/q35/DSDT.numamem",
+"tests/data/acpi/q35/DSDT.pvpanic-isa",
+"tests/data/acpi/q35/DSDT.tis.tpm12",
+"tests/data/acpi/q35/DSDT.tis.tpm2",
+"tests/data/acpi/q35/DSDT.viot",
+"tests/data/acpi/q35/DSDT.xapic",
Signature · 1 line
2.39.1
#13 lore raw

PATCH 13/33 pcihp: move PCI _DSM function 0 prolog into separate function

In reply to Igor Mammedov

it will be reused by follow up patches that will implement static _DSM for non-hotpluggable devices.

no functional AML change, only context one, where 'cap' (Local1) initialization is moved after UUID/revision checks.

---
 hw/i386/acpi-build.c | 54 ++++++++++++++++++++++++--------------------
 1 file changed, 30 insertions(+), 24 deletions(-)
hw/i386/acpi-build.c +30 -24
index c0674ae2d1..cb80b7a318 100644
@@ -372,6 +372,33 @@ Aml *aml_pci_device_dsm(void)
     return method;
 }
 
+static void build_append_pci_dsm_func0_common(Aml *ctx, Aml *retvar)
+{
+    Aml *UUID, *ifctx1;
+    uint8_t byte_list[1] = { 0 }; /* nothing supported yet */
+
+    aml_append(ctx, aml_store(aml_buffer(1, byte_list), retvar));
+    /*
+     * PCI Firmware Specification 3.1
+     * 4.6.  _DSM Definitions for PCI
+     */
+    UUID = aml_touuid("E5C937D0-3553-4D7A-9117-EA4D19C3434D");
+    ifctx1 = aml_if(aml_lnot(aml_equal(aml_arg(0), UUID)));
+    {
+        /* call is for unsupported UUID, bail out */
+        aml_append(ifctx1, aml_return(retvar));
+    }
+    aml_append(ctx, ifctx1);
+
+    ifctx1 = aml_if(aml_lless(aml_arg(1), aml_int(2)));
+    {
+        /* call is for unsupported REV, bail out */
+        aml_append(ifctx1, aml_return(retvar));
+    }
+    aml_append(ctx, ifctx1);
+}
+
+
 static void build_append_pcihp_notify_entry(Aml *method, int slot)
 {
     Aml *if_ctx;
@@ -569,14 +596,13 @@ static bool build_append_notfication_callback(Aml *parent_scope,
 
 static Aml *aml_pci_pdsm(void)
 {
-    Aml *method, *UUID, *ifctx, *ifctx1;
+    Aml *method, *ifctx, *ifctx1;
     Aml *ret = aml_local(0);
     Aml *caps = aml_local(1);
     Aml *acpi_index = aml_local(2);
     Aml *zero = aml_int(0);
     Aml *one = aml_int(1);
     Aml *func = aml_arg(2);
-    Aml *rev = aml_arg(1);
     Aml *params = aml_arg(4);
     Aml *bnum = aml_derefof(aml_index(params, aml_int(0)));
     Aml *sunum = aml_derefof(aml_index(params, aml_int(1)));
@@ -586,29 +612,9 @@ static Aml *aml_pci_pdsm(void)
     /* get supported functions */
     ifctx = aml_if(aml_equal(func, zero));
     {
-        uint8_t byte_list[1] = { 0 }; /* nothing supported yet */
-        aml_append(ifctx, aml_store(aml_buffer(1, byte_list), ret));
-        aml_append(ifctx, aml_store(zero, caps));
-
-       /*
-        * PCI Firmware Specification 3.1
-        * 4.6.  _DSM Definitions for PCI
-        */
-        UUID = aml_touuid("E5C937D0-3553-4D7A-9117-EA4D19C3434D");
-        ifctx1 = aml_if(aml_lnot(aml_equal(aml_arg(0), UUID)));
-        {
-            /* call is for unsupported UUID, bail out */
-            aml_append(ifctx1, aml_return(ret));
-        }
-        aml_append(ifctx, ifctx1);
-
-        ifctx1 = aml_if(aml_lless(rev, aml_int(2)));
-        {
-            /* call is for unsupported REV, bail out */
-            aml_append(ifctx1, aml_return(ret));
-        }
-        aml_append(ifctx, ifctx1);
+        build_append_pci_dsm_func0_common(ifctx, ret);
 
+        aml_append(ifctx, aml_store(zero, caps));
         aml_append(ifctx,
             aml_store(aml_call2("AIDX", bnum, sunum), acpi_index));
         /*
Signature · 1 line
2.39.1
#14 lore raw

PATCH 14/33 tests: acpi: update expected blobs

In reply to Igor Mammedov

only following context change:
- Local1 = Zero

    If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
    {
        Return (Local0)
 ...
        Return (Local0)
    }

+ Local1 = Zero
Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]

---
 tests/qtest/bios-tables-test-allowed-diff.h   |  35 ------------------
 tests/data/acpi/pc/DSDT                       | Bin 6360 -> 6360 bytes
 tests/data/acpi/pc/DSDT.acpierst              | Bin 6283 -> 6283 bytes
 tests/data/acpi/pc/DSDT.acpihmat              | Bin 7685 -> 7685 bytes
 tests/data/acpi/pc/DSDT.bridge                | Bin 12487 -> 12487 bytes
 tests/data/acpi/pc/DSDT.cphp                  | Bin 6824 -> 6824 bytes
 tests/data/acpi/pc/DSDT.dimmpxm               | Bin 8014 -> 8014 bytes
 tests/data/acpi/pc/DSDT.hpbridge              | Bin 6323 -> 6323 bytes
 tests/data/acpi/pc/DSDT.ipmikcs               | Bin 6432 -> 6432 bytes
 tests/data/acpi/pc/DSDT.memhp                 | Bin 7719 -> 7719 bytes
 tests/data/acpi/pc/DSDT.nohpet                | Bin 6218 -> 6218 bytes
 tests/data/acpi/pc/DSDT.numamem               | Bin 6366 -> 6366 bytes
 tests/data/acpi/pc/DSDT.roothp                | Bin 9745 -> 9745 bytes
 tests/data/acpi/q35/DSDT                      | Bin 8252 -> 8252 bytes
 tests/data/acpi/q35/DSDT.acpierst             | Bin 8269 -> 8269 bytes
 tests/data/acpi/q35/DSDT.acpihmat             | Bin 9577 -> 9577 bytes
 tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 8531 -> 8531 bytes
 tests/data/acpi/q35/DSDT.applesmc             | Bin 8298 -> 8298 bytes
 tests/data/acpi/q35/DSDT.bridge               | Bin 11481 -> 11481 bytes
 tests/data/acpi/q35/DSDT.core-count2          | Bin 32392 -> 32392 bytes
 tests/data/acpi/q35/DSDT.cphp                 | Bin 8716 -> 8716 bytes
 tests/data/acpi/q35/DSDT.cxl                  | Bin 9578 -> 9578 bytes
 tests/data/acpi/q35/DSDT.dimmpxm              | Bin 9906 -> 9906 bytes
 tests/data/acpi/q35/DSDT.ipmibt               | Bin 8327 -> 8327 bytes
 tests/data/acpi/q35/DSDT.ipmismbus            | Bin 8340 -> 8340 bytes
 tests/data/acpi/q35/DSDT.ivrs                 | Bin 8269 -> 8269 bytes
 tests/data/acpi/q35/DSDT.memhp                | Bin 9611 -> 9611 bytes
 tests/data/acpi/q35/DSDT.mmio64               | Bin 9382 -> 9382 bytes
 tests/data/acpi/q35/DSDT.multi-bridge         | Bin 12545 -> 12545 bytes
 tests/data/acpi/q35/DSDT.nohpet               | Bin 8110 -> 8110 bytes
 tests/data/acpi/q35/DSDT.numamem              | Bin 8258 -> 8258 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa          | Bin 8353 -> 8353 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12            | Bin 8858 -> 8858 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2             | Bin 8884 -> 8884 bytes
 tests/data/acpi/q35/DSDT.viot                 | Bin 9361 -> 9377 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35615 -> 35615 bytes
 36 files changed, 35 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -35
index 7e7745db39..dfb8523c8b 100644
@@ -1,36 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/DSDT",
-"tests/data/acpi/pc/DSDT.acpierst",
-"tests/data/acpi/pc/DSDT.acpihmat",
-"tests/data/acpi/pc/DSDT.bridge",
-"tests/data/acpi/pc/DSDT.cphp",
-"tests/data/acpi/pc/DSDT.dimmpxm",
-"tests/data/acpi/pc/DSDT.hpbridge",
-"tests/data/acpi/pc/DSDT.ipmikcs",
-"tests/data/acpi/pc/DSDT.memhp",
-"tests/data/acpi/pc/DSDT.nohpet",
-"tests/data/acpi/pc/DSDT.numamem",
-"tests/data/acpi/pc/DSDT.roothp",
-"tests/data/acpi/q35/DSDT",
-"tests/data/acpi/q35/DSDT.acpierst",
-"tests/data/acpi/q35/DSDT.acpihmat",
-"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
-"tests/data/acpi/q35/DSDT.applesmc",
-"tests/data/acpi/q35/DSDT.bridge",
-"tests/data/acpi/q35/DSDT.core-count2",
-"tests/data/acpi/q35/DSDT.cphp",
-"tests/data/acpi/q35/DSDT.cxl",
-"tests/data/acpi/q35/DSDT.dimmpxm",
-"tests/data/acpi/q35/DSDT.ipmibt",
-"tests/data/acpi/q35/DSDT.ipmismbus",
-"tests/data/acpi/q35/DSDT.ivrs",
-"tests/data/acpi/q35/DSDT.memhp",
-"tests/data/acpi/q35/DSDT.mmio64",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.nohpet",
-"tests/data/acpi/q35/DSDT.numamem",
-"tests/data/acpi/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-"tests/data/acpi/q35/DSDT.viot",
-"tests/data/acpi/q35/DSDT.xapic",
tests/data/acpi/pc/DSDT binary +0 -0
index 0b475fb5a966543fef2cd7672a0b198838a63151..ec133a6d3aabcfd22b7b46019338db2de255da70 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
index 17ef7caeb6fe4445f1234ff060c3db6809184ef6..2b4b7f31919f360e038e37de713639da753f13aa 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
index 675b674eaa92d99513ac243a97064d369791ee53..714a123e7a500cf0f862ff6c4e9a3f50a96af056 100644
GIT binary patch
tests/data/acpi/pc/DSDT.bridge binary +0 -0
index c1ce06136619f55c084a34c51997c059c29cb06a..6c0543cf75ad3e02468ed4925fd3369a183e9b45 100644
GIT binary patch
tests/data/acpi/pc/DSDT.cphp binary +0 -0
index 754ab854dc48fc1af2d335e7269c23a056e66eb8..e1bcb0a4f3ee1269bdd5e949206b40d0e3c076e6 100644
GIT binary patch
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
index 170503336b3fd94cc7a4356003fa080f0ef57b01..1c90e119c5d3dc7e86d04942114e5cfe40de6039 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
index 5dea100bc9492bb2367aac8660522201785c1efb..04e1c20f63be7c6c574e72590332707ca410852a 100644
GIT binary patch
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
index dd7135602709fc4a361930c74f9bebc6b32e6916..3c2aba132f10b5e4a9931877533a9d8f260b7381 100644
GIT binary patch
tests/data/acpi/pc/DSDT.memhp binary +0 -0
index 2f895e9b385c1ae2f58c7ade4de02328b1be7356..811965f42d97adadde6e9ec6d6153e767041bc6d 100644
GIT binary patch
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
index c012b63ace2f359eec0368ed22ef507ee3905c78..bbf73023ade329770ff9f9ac5c897218764182b5 100644
GIT binary patch
tests/data/acpi/pc/DSDT.numamem binary +0 -0
index f2ef4b97290cc58c514c3ce7fd45cb08214d7138..c5d93366a417ad1a92c01659f1db9c159caa7132 100644
GIT binary patch
tests/data/acpi/pc/DSDT.roothp binary +0 -0
index 657c8263f0c649abc806a67576fd74cb32af60c3..9e3d482366bd800cf987044801eebc814629b15b 100644
GIT binary patch
tests/data/acpi/q35/DSDT binary +0 -0
index d68c472b460e4609a64ea67de3c4cebfca76164d..c304e15e366d7317fd0e9db0a144f02e0437d7a1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
index de7ae27125f9667d7aa7a7cc0e8210773b61a2e2..3aa5c4b3193d32bb8263a1fe06c05b714541c532 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
index 48e2862257ac614b5fd6391c4ec425106c48afb1..3ffbf8f83f64144ace17ff5f06bcb4fec9df33d9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat-noinitiator binary +0 -0
index 30a4aa2ec8feb6012a64d476ff37b14717d20eaf..ebec32b575d310f98937fe9208f0c60349ca753d 100644
GIT binary patch
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
index 84e2b5cbc4483ae93634f223160253231dcc4932..b0994644ec811b962e80f49e36e122967f5af1d1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.bridge binary +0 -0
index e411d40fd1e297879d78dcf15486dd465ab54568..8e11b8ea4862c8ec27376703c9c43e9895ca60eb 100644
GIT binary patch
tests/data/acpi/q35/DSDT.core-count2 binary +0 -0
index 0603db8cc63cfc562f83e55eaf5162e7c29bf4d1..a895599c3c53c0cd0888ec166a30d6c036d26b93 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cphp binary +0 -0
index beeb83c33b385fc8b41d44f299b8d9ba7203d935..725998cb587c02ac963f290bac5c14d665bc85e9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cxl binary +0 -0
index 3d18b9672d124a0cf11a79e92c396a1b883d0589..04c2c66a25536854b4305787c8e0b41e96c3c133 100644
GIT binary patch
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
index 99a93e12a7faac78e9524ad6758f42c5c0df18eb..ef643b4ee02cacb9a55f89b8e7f05524125515a1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
index 7f7601dbff820044aa646048c0bfe0e6324b9d0d..b136aea961c89a97db09db9b68809979564d8faf 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
index 6c5d1afe443d9261d3b93801711f8d5b267696f3..0970dbd5896fc0038b1369dbbcc982ead7736ae6 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
index de7ae27125f9667d7aa7a7cc0e8210773b61a2e2..3aa5c4b3193d32bb8263a1fe06c05b714541c532 100644
GIT binary patch
tests/data/acpi/q35/DSDT.memhp binary +0 -0
index 79bce5c8f0132e72b8e700488ea56c7593737810..9709e5a7a7edcb7509954b553f7bf29a424033db 100644
GIT binary patch
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
index c249929add97439ceb9f891d44c425311517ad18..e1cd01f2349bb8c2f7f8badad11441ffe6d57acc 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index f2f60fdbb3b44ab9adb69bb36e4a80978536af9b..3b9dffb565833cc87bbf08dadfc1f31ac858e93b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
index 9ff9983a80a7487470ccd02ce587200444675816..2cf7f6db0fd8de357278f942a4082e714804dca9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.numamem binary +0 -0
index 1e7c45ef3ccb000a06f64152622b4bd27916d181..310e3d5053b90863f96c29dd69a514b4999b4a19 100644
GIT binary patch
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
index ed47451c44e3041e5b7fed55de7b6ef1aca54350..6672b6fa05c8ee30a8ea4ab0931d59c1315a4e9c 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
index efc2efc19f00ca7564467756616da44f5fd71cfe..eae2dc599331516e11632356f05d7831d1fa1e6a 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
index 675339715f72b4400445ce8c0dd12f416aa0efb0..68c6a7d244cfc78efa6b9cd1385f2134ca149ad7 100644
GIT binary patch
tests/data/acpi/q35/DSDT.viot binary +0 -0
index eeb40b360f7c1de93501e1ddcd7dab306a51113b..4d2937a87c4a39993eaa756f02d59ef35a08f1c2 100644
GIT binary patch
tests/data/acpi/q35/DSDT.xapic binary +0 -0
index 3aa86f07243f0449c7dc245650715d729744e3ee..e9b4881bdc72eb7c59dcf258c1a98363b46bfbcd 100644
GIT binary patch
Signature · 1 line
2.39.1
#15 lore raw

Re: [PATCH 14/33] tests: acpi: update expected blobs

Quoted 9 lines · Igor Mammedov

only following context change:
- Local1 = Zero

    If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
    {
        Return (Local0)
 ...
        Return (Local0)
    }
Quoted 4 lines

+ Local1 = Zero
Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]

Nope:

diff -ru -N -IDisassembly -IChecksum '-I* Length ' old/asl/tests/data/acpi/q35/DSDT.viot.dsl new/asl/tests/data/acpi/q35/DSDT.viot.dsl
:--- old/asl/tests/data/acpi/q35/DSDT.viot.dsl 2023-03-01 19:22:57.636454958 -0500 :+++ new/asl/tests/data/acpi/q35/DSDT.viot.dsl 2023-03-01 19:22:58.451460462 -0500 :@@ -148,7 +148,6 @@

                     {
                          0x00                                             // .
                     }
-                Local1 = Zero
                 If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
                 {
                     Return (Local0)
:@@ -159,12 +158,14 @@
                     Return (Local0)
                 }

+ Local1 = Zero

                 Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]
                     ))
                 If (!((Local2 == Zero) | (Local2 == 0xFFFFFFFF)))
                 {
                     Local1 |= One
                     Local1 |= (One << 0x07)

+ Local1 |= (One << 0x05)
}

Local0 [Zero] = Local1

and the funny thing is, the second change is in the expected file but not in the code so this patch causes the test to fail.

Quoted 401 lines
---
 tests/qtest/bios-tables-test-allowed-diff.h   |  35 ------------------
 tests/data/acpi/pc/DSDT                       | Bin 6360 -> 6360 bytes
 tests/data/acpi/pc/DSDT.acpierst              | Bin 6283 -> 6283 bytes
 tests/data/acpi/pc/DSDT.acpihmat              | Bin 7685 -> 7685 bytes
 tests/data/acpi/pc/DSDT.bridge                | Bin 12487 -> 12487 bytes
 tests/data/acpi/pc/DSDT.cphp                  | Bin 6824 -> 6824 bytes
 tests/data/acpi/pc/DSDT.dimmpxm               | Bin 8014 -> 8014 bytes
 tests/data/acpi/pc/DSDT.hpbridge              | Bin 6323 -> 6323 bytes
 tests/data/acpi/pc/DSDT.ipmikcs               | Bin 6432 -> 6432 bytes
 tests/data/acpi/pc/DSDT.memhp                 | Bin 7719 -> 7719 bytes
 tests/data/acpi/pc/DSDT.nohpet                | Bin 6218 -> 6218 bytes
 tests/data/acpi/pc/DSDT.numamem               | Bin 6366 -> 6366 bytes
 tests/data/acpi/pc/DSDT.roothp                | Bin 9745 -> 9745 bytes
 tests/data/acpi/q35/DSDT                      | Bin 8252 -> 8252 bytes
 tests/data/acpi/q35/DSDT.acpierst             | Bin 8269 -> 8269 bytes
 tests/data/acpi/q35/DSDT.acpihmat             | Bin 9577 -> 9577 bytes
 tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 8531 -> 8531 bytes
 tests/data/acpi/q35/DSDT.applesmc             | Bin 8298 -> 8298 bytes
 tests/data/acpi/q35/DSDT.bridge               | Bin 11481 -> 11481 bytes
 tests/data/acpi/q35/DSDT.core-count2          | Bin 32392 -> 32392 bytes
 tests/data/acpi/q35/DSDT.cphp                 | Bin 8716 -> 8716 bytes
 tests/data/acpi/q35/DSDT.cxl                  | Bin 9578 -> 9578 bytes
 tests/data/acpi/q35/DSDT.dimmpxm              | Bin 9906 -> 9906 bytes
 tests/data/acpi/q35/DSDT.ipmibt               | Bin 8327 -> 8327 bytes
 tests/data/acpi/q35/DSDT.ipmismbus            | Bin 8340 -> 8340 bytes
 tests/data/acpi/q35/DSDT.ivrs                 | Bin 8269 -> 8269 bytes
 tests/data/acpi/q35/DSDT.memhp                | Bin 9611 -> 9611 bytes
 tests/data/acpi/q35/DSDT.mmio64               | Bin 9382 -> 9382 bytes
 tests/data/acpi/q35/DSDT.multi-bridge         | Bin 12545 -> 12545 bytes
 tests/data/acpi/q35/DSDT.nohpet               | Bin 8110 -> 8110 bytes
 tests/data/acpi/q35/DSDT.numamem              | Bin 8258 -> 8258 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa          | Bin 8353 -> 8353 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12            | Bin 8858 -> 8858 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2             | Bin 8884 -> 8884 bytes
 tests/data/acpi/q35/DSDT.viot                 | Bin 9361 -> 9377 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35615 -> 35615 bytes
 36 files changed, 35 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -35
index 7e7745db39..dfb8523c8b 100644
@@ -1,36 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/DSDT",
-"tests/data/acpi/pc/DSDT.acpierst",
-"tests/data/acpi/pc/DSDT.acpihmat",
-"tests/data/acpi/pc/DSDT.bridge",
-"tests/data/acpi/pc/DSDT.cphp",
-"tests/data/acpi/pc/DSDT.dimmpxm",
-"tests/data/acpi/pc/DSDT.hpbridge",
-"tests/data/acpi/pc/DSDT.ipmikcs",
-"tests/data/acpi/pc/DSDT.memhp",
-"tests/data/acpi/pc/DSDT.nohpet",
-"tests/data/acpi/pc/DSDT.numamem",
-"tests/data/acpi/pc/DSDT.roothp",
-"tests/data/acpi/q35/DSDT",
-"tests/data/acpi/q35/DSDT.acpierst",
-"tests/data/acpi/q35/DSDT.acpihmat",
-"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
-"tests/data/acpi/q35/DSDT.applesmc",
-"tests/data/acpi/q35/DSDT.bridge",
-"tests/data/acpi/q35/DSDT.core-count2",
-"tests/data/acpi/q35/DSDT.cphp",
-"tests/data/acpi/q35/DSDT.cxl",
-"tests/data/acpi/q35/DSDT.dimmpxm",
-"tests/data/acpi/q35/DSDT.ipmibt",
-"tests/data/acpi/q35/DSDT.ipmismbus",
-"tests/data/acpi/q35/DSDT.ivrs",
-"tests/data/acpi/q35/DSDT.memhp",
-"tests/data/acpi/q35/DSDT.mmio64",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.nohpet",
-"tests/data/acpi/q35/DSDT.numamem",
-"tests/data/acpi/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-"tests/data/acpi/q35/DSDT.viot",
-"tests/data/acpi/q35/DSDT.xapic",
tests/data/acpi/pc/DSDT binary +0 -0
index 0b475fb5a966543fef2cd7672a0b198838a63151..ec133a6d3aabcfd22b7b46019338db2de255da70 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
index 17ef7caeb6fe4445f1234ff060c3db6809184ef6..2b4b7f31919f360e038e37de713639da753f13aa 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
index 675b674eaa92d99513ac243a97064d369791ee53..714a123e7a500cf0f862ff6c4e9a3f50a96af056 100644
GIT binary patch
tests/data/acpi/pc/DSDT.bridge binary +0 -0
index c1ce06136619f55c084a34c51997c059c29cb06a..6c0543cf75ad3e02468ed4925fd3369a183e9b45 100644
GIT binary patch
tests/data/acpi/pc/DSDT.cphp binary +0 -0
index 754ab854dc48fc1af2d335e7269c23a056e66eb8..e1bcb0a4f3ee1269bdd5e949206b40d0e3c076e6 100644
GIT binary patch
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
index 170503336b3fd94cc7a4356003fa080f0ef57b01..1c90e119c5d3dc7e86d04942114e5cfe40de6039 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
index 5dea100bc9492bb2367aac8660522201785c1efb..04e1c20f63be7c6c574e72590332707ca410852a 100644
GIT binary patch
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
index dd7135602709fc4a361930c74f9bebc6b32e6916..3c2aba132f10b5e4a9931877533a9d8f260b7381 100644
GIT binary patch
tests/data/acpi/pc/DSDT.memhp binary +0 -0
index 2f895e9b385c1ae2f58c7ade4de02328b1be7356..811965f42d97adadde6e9ec6d6153e767041bc6d 100644
GIT binary patch
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
index c012b63ace2f359eec0368ed22ef507ee3905c78..bbf73023ade329770ff9f9ac5c897218764182b5 100644
GIT binary patch
tests/data/acpi/pc/DSDT.numamem binary +0 -0
index f2ef4b97290cc58c514c3ce7fd45cb08214d7138..c5d93366a417ad1a92c01659f1db9c159caa7132 100644
GIT binary patch
tests/data/acpi/pc/DSDT.roothp binary +0 -0
index 657c8263f0c649abc806a67576fd74cb32af60c3..9e3d482366bd800cf987044801eebc814629b15b 100644
GIT binary patch
tests/data/acpi/q35/DSDT binary +0 -0
index d68c472b460e4609a64ea67de3c4cebfca76164d..c304e15e366d7317fd0e9db0a144f02e0437d7a1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
index de7ae27125f9667d7aa7a7cc0e8210773b61a2e2..3aa5c4b3193d32bb8263a1fe06c05b714541c532 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
index 48e2862257ac614b5fd6391c4ec425106c48afb1..3ffbf8f83f64144ace17ff5f06bcb4fec9df33d9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat-noinitiator binary +0 -0
index 30a4aa2ec8feb6012a64d476ff37b14717d20eaf..ebec32b575d310f98937fe9208f0c60349ca753d 100644
GIT binary patch
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
index 84e2b5cbc4483ae93634f223160253231dcc4932..b0994644ec811b962e80f49e36e122967f5af1d1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.bridge binary +0 -0
index e411d40fd1e297879d78dcf15486dd465ab54568..8e11b8ea4862c8ec27376703c9c43e9895ca60eb 100644
GIT binary patch
tests/data/acpi/q35/DSDT.core-count2 binary +0 -0
index 0603db8cc63cfc562f83e55eaf5162e7c29bf4d1..a895599c3c53c0cd0888ec166a30d6c036d26b93 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cphp binary +0 -0
index beeb83c33b385fc8b41d44f299b8d9ba7203d935..725998cb587c02ac963f290bac5c14d665bc85e9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cxl binary +0 -0
index 3d18b9672d124a0cf11a79e92c396a1b883d0589..04c2c66a25536854b4305787c8e0b41e96c3c133 100644
GIT binary patch
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
index 99a93e12a7faac78e9524ad6758f42c5c0df18eb..ef643b4ee02cacb9a55f89b8e7f05524125515a1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
index 7f7601dbff820044aa646048c0bfe0e6324b9d0d..b136aea961c89a97db09db9b68809979564d8faf 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
index 6c5d1afe443d9261d3b93801711f8d5b267696f3..0970dbd5896fc0038b1369dbbcc982ead7736ae6 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
index de7ae27125f9667d7aa7a7cc0e8210773b61a2e2..3aa5c4b3193d32bb8263a1fe06c05b714541c532 100644
GIT binary patch
tests/data/acpi/q35/DSDT.memhp binary +0 -0
index 79bce5c8f0132e72b8e700488ea56c7593737810..9709e5a7a7edcb7509954b553f7bf29a424033db 100644
GIT binary patch
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
index c249929add97439ceb9f891d44c425311517ad18..e1cd01f2349bb8c2f7f8badad11441ffe6d57acc 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index f2f60fdbb3b44ab9adb69bb36e4a80978536af9b..3b9dffb565833cc87bbf08dadfc1f31ac858e93b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
index 9ff9983a80a7487470ccd02ce587200444675816..2cf7f6db0fd8de357278f942a4082e714804dca9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.numamem binary +0 -0
index 1e7c45ef3ccb000a06f64152622b4bd27916d181..310e3d5053b90863f96c29dd69a514b4999b4a19 100644
GIT binary patch
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
index ed47451c44e3041e5b7fed55de7b6ef1aca54350..6672b6fa05c8ee30a8ea4ab0931d59c1315a4e9c 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
index efc2efc19f00ca7564467756616da44f5fd71cfe..eae2dc599331516e11632356f05d7831d1fa1e6a 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
index 675339715f72b4400445ce8c0dd12f416aa0efb0..68c6a7d244cfc78efa6b9cd1385f2134ca149ad7 100644
GIT binary patch
tests/data/acpi/q35/DSDT.viot binary +0 -0
index eeb40b360f7c1de93501e1ddcd7dab306a51113b..4d2937a87c4a39993eaa756f02d59ef35a08f1c2 100644
GIT binary patch
tests/data/acpi/q35/DSDT.xapic binary +0 -0
index 3aa86f07243f0449c7dc245650715d729744e3ee..e9b4881bdc72eb7c59dcf258c1a98363b46bfbcd 100644
GIT binary patch
Signature · 2 lines
-- 
2.39.1
#16 lore raw

Re: [PATCH 14/33] tests: acpi: update expected blobs

Quoted 45 lines · On Wed, 1 Mar 2023 19:27:33 -0500 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 9 lines · Igor Mammedov

only following context change:
- Local1 = Zero

    If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
    {
        Return (Local0)
 ...
        Return (Local0)
    }
Quoted 4 lines

+ Local1 = Zero
Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]

Nope:

diff -ru -N -IDisassembly -IChecksum '-I* Length ' old/asl/tests/data/acpi/q35/DSDT.viot.dsl new/asl/tests/data/acpi/q35/DSDT.viot.dsl
:--- old/asl/tests/data/acpi/q35/DSDT.viot.dsl 2023-03-01 19:22:57.636454958 -0500 :+++ new/asl/tests/data/acpi/q35/DSDT.viot.dsl 2023-03-01 19:22:58.451460462 -0500 :@@ -148,7 +148,6 @@

                     {
                          0x00                                             // .
                     }
-                Local1 = Zero
                 If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
                 {
                     Return (Local0)
:@@ -159,12 +158,14 @@
                     Return (Local0)
                 }
(quoted diff) +2 -0
+                Local1 = Zero
                 Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]
                     ))
                 If (!((Local2 == Zero) | (Local2 == 0xFFFFFFFF)))
                 {
                     Local1 |= One
                     Local1 |= (One << 0x07)
+                    Local1 |= (One << 0x05)
                 }
 
                 Local0 [Zero] = Local1
Quoted 2 lines

and the funny thing is, the second change is in the expected file but not in the code so this patch causes the test to fail.

above diff is remnants of some old version of the patch before patches were reshuffled.

for some reason q35/viot test gets skipped => no table rebuild => stale DSDT.viot table

reverting recently merged commit c471eb4f40, I can get q35/viot test back:

commit c471eb4f40445908c1be7bb11a37ac676a0edae7

Author: Fabiano Rosas <[email protected]>
Date:   Wed Feb 8 16:46:57 2023 -0300

tests/qtest: Check for devices in bios-tables-test

so checks aren't working as expected on my host for some reason

Quoted 404 lines
Quoted 403 lines

---
 tests/qtest/bios-tables-test-allowed-diff.h   |  35 ------------------
 tests/data/acpi/pc/DSDT                       | Bin 6360 -> 6360 bytes
 tests/data/acpi/pc/DSDT.acpierst              | Bin 6283 -> 6283 bytes
 tests/data/acpi/pc/DSDT.acpihmat              | Bin 7685 -> 7685 bytes
 tests/data/acpi/pc/DSDT.bridge                | Bin 12487 -> 12487 bytes
 tests/data/acpi/pc/DSDT.cphp                  | Bin 6824 -> 6824 bytes
 tests/data/acpi/pc/DSDT.dimmpxm               | Bin 8014 -> 8014 bytes
 tests/data/acpi/pc/DSDT.hpbridge              | Bin 6323 -> 6323 bytes
 tests/data/acpi/pc/DSDT.ipmikcs               | Bin 6432 -> 6432 bytes
 tests/data/acpi/pc/DSDT.memhp                 | Bin 7719 -> 7719 bytes
 tests/data/acpi/pc/DSDT.nohpet                | Bin 6218 -> 6218 bytes
 tests/data/acpi/pc/DSDT.numamem               | Bin 6366 -> 6366 bytes
 tests/data/acpi/pc/DSDT.roothp                | Bin 9745 -> 9745 bytes
 tests/data/acpi/q35/DSDT                      | Bin 8252 -> 8252 bytes
 tests/data/acpi/q35/DSDT.acpierst             | Bin 8269 -> 8269 bytes
 tests/data/acpi/q35/DSDT.acpihmat             | Bin 9577 -> 9577 bytes
 tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 8531 -> 8531 bytes
 tests/data/acpi/q35/DSDT.applesmc             | Bin 8298 -> 8298 bytes
 tests/data/acpi/q35/DSDT.bridge               | Bin 11481 -> 11481 bytes
 tests/data/acpi/q35/DSDT.core-count2          | Bin 32392 -> 32392 bytes
 tests/data/acpi/q35/DSDT.cphp                 | Bin 8716 -> 8716 bytes
 tests/data/acpi/q35/DSDT.cxl                  | Bin 9578 -> 9578 bytes
 tests/data/acpi/q35/DSDT.dimmpxm              | Bin 9906 -> 9906 bytes
 tests/data/acpi/q35/DSDT.ipmibt               | Bin 8327 -> 8327 bytes
 tests/data/acpi/q35/DSDT.ipmismbus            | Bin 8340 -> 8340 bytes
 tests/data/acpi/q35/DSDT.ivrs                 | Bin 8269 -> 8269 bytes
 tests/data/acpi/q35/DSDT.memhp                | Bin 9611 -> 9611 bytes
 tests/data/acpi/q35/DSDT.mmio64               | Bin 9382 -> 9382 bytes
 tests/data/acpi/q35/DSDT.multi-bridge         | Bin 12545 -> 12545 bytes
 tests/data/acpi/q35/DSDT.nohpet               | Bin 8110 -> 8110 bytes
 tests/data/acpi/q35/DSDT.numamem              | Bin 8258 -> 8258 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa          | Bin 8353 -> 8353 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12            | Bin 8858 -> 8858 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2             | Bin 8884 -> 8884 bytes
 tests/data/acpi/q35/DSDT.viot                 | Bin 9361 -> 9377 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35615 -> 35615 bytes
 36 files changed, 35 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -35
index 7e7745db39..dfb8523c8b 100644
@@ -1,36 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/DSDT",
-"tests/data/acpi/pc/DSDT.acpierst",
-"tests/data/acpi/pc/DSDT.acpihmat",
-"tests/data/acpi/pc/DSDT.bridge",
-"tests/data/acpi/pc/DSDT.cphp",
-"tests/data/acpi/pc/DSDT.dimmpxm",
-"tests/data/acpi/pc/DSDT.hpbridge",
-"tests/data/acpi/pc/DSDT.ipmikcs",
-"tests/data/acpi/pc/DSDT.memhp",
-"tests/data/acpi/pc/DSDT.nohpet",
-"tests/data/acpi/pc/DSDT.numamem",
-"tests/data/acpi/pc/DSDT.roothp",
-"tests/data/acpi/q35/DSDT",
-"tests/data/acpi/q35/DSDT.acpierst",
-"tests/data/acpi/q35/DSDT.acpihmat",
-"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
-"tests/data/acpi/q35/DSDT.applesmc",
-"tests/data/acpi/q35/DSDT.bridge",
-"tests/data/acpi/q35/DSDT.core-count2",
-"tests/data/acpi/q35/DSDT.cphp",
-"tests/data/acpi/q35/DSDT.cxl",
-"tests/data/acpi/q35/DSDT.dimmpxm",
-"tests/data/acpi/q35/DSDT.ipmibt",
-"tests/data/acpi/q35/DSDT.ipmismbus",
-"tests/data/acpi/q35/DSDT.ivrs",
-"tests/data/acpi/q35/DSDT.memhp",
-"tests/data/acpi/q35/DSDT.mmio64",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.nohpet",
-"tests/data/acpi/q35/DSDT.numamem",
-"tests/data/acpi/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-"tests/data/acpi/q35/DSDT.viot",
-"tests/data/acpi/q35/DSDT.xapic",
tests/data/acpi/pc/DSDT binary +0 -0
index 0b475fb5a966543fef2cd7672a0b198838a63151..ec133a6d3aabcfd22b7b46019338db2de255da70 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
index 17ef7caeb6fe4445f1234ff060c3db6809184ef6..2b4b7f31919f360e038e37de713639da753f13aa 100644
GIT binary patch

acmeA+>^9sG&p0`WQH6;iadRspn>YYICk0#p

delta 20
bcmeA+>^9sG&&XWBkT^M>QDt)*Bda(7L?;Ex

tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
index 675b674eaa92d99513ac243a97064d369791ee53..714a123e7a500cf0f862ff6c4e9a3f50a96af056 100644
GIT binary patch

acmZp*X|>r9&p0`WQH6;iadRtUgA4#az6Ip~

delta 20
bcmZp*X|>r9&&XWBkT^M>QDt)*W4#OjMaTwI

tests/data/acpi/pc/DSDT.bridge binary +0 -0
index c1ce06136619f55c084a34c51997c059c29cb06a..6c0543cf75ad3e02468ed4925fd3369a183e9b45 100644
GIT binary patch
tests/data/acpi/pc/DSDT.cphp binary +0 -0
index 754ab854dc48fc1af2d335e7269c23a056e66eb8..e1bcb0a4f3ee1269bdd5e949206b40d0e3c076e6 100644
GIT binary patch
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
index 170503336b3fd94cc7a4356003fa080f0ef57b01..1c90e119c5d3dc7e86d04942114e5cfe40de6039 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
index 5dea100bc9492bb2367aac8660522201785c1efb..04e1c20f63be7c6c574e72590332707ca410852a 100644
GIT binary patch
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
index dd7135602709fc4a361930c74f9bebc6b32e6916..3c2aba132f10b5e4a9931877533a9d8f260b7381 100644
GIT binary patch
tests/data/acpi/pc/DSDT.memhp binary +0 -0
index 2f895e9b385c1ae2f58c7ade4de02328b1be7356..811965f42d97adadde6e9ec6d6153e767041bc6d 100644
GIT binary patch
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
index c012b63ace2f359eec0368ed22ef507ee3905c78..bbf73023ade329770ff9f9ac5c897218764182b5 100644
GIT binary patch
tests/data/acpi/pc/DSDT.numamem binary +0 -0
index f2ef4b97290cc58c514c3ce7fd45cb08214d7138..c5d93366a417ad1a92c01659f1db9c159caa7132 100644
GIT binary patch
tests/data/acpi/pc/DSDT.roothp binary +0 -0
index 657c8263f0c649abc806a67576fd74cb32af60c3..9e3d482366bd800cf987044801eebc814629b15b 100644
GIT binary patch

bcmbQ}Gtp;5JR@@fL*nFkMwQKNjNK{#N$>`r

tests/data/acpi/q35/DSDT binary +0 -0
index d68c472b460e4609a64ea67de3c4cebfca76164d..c304e15e366d7317fd0e9db0a144f02e0437d7a1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
index de7ae27125f9667d7aa7a7cc0e8210773b61a2e2..3aa5c4b3193d32bb8263a1fe06c05b714541c532 100644
GIT binary patch

acmX@>aModi64PW=CKV=z#LXT|ta1QCqXkd^

delta 20
bcmX@>aModi5)*R)L*is5CY8;eOe}H$NxcQW

tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
index 48e2862257ac614b5fd6391c4ec425106c48afb1..3ffbf8f83f64144ace17ff5f06bcb4fec9df33d9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat-noinitiator binary +0 -0
index 30a4aa2ec8feb6012a64d476ff37b14717d20eaf..ebec32b575d310f98937fe9208f0c60349ca753d 100644
GIT binary patch
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
index 84e2b5cbc4483ae93634f223160253231dcc4932..b0994644ec811b962e80f49e36e122967f5af1d1 100644
GIT binary patch

acmaFm@XBF>64PW=CKV=z#LXT|N^$^3@dc*<

delta 20
bcmaFm@XBF>5)*R)L*is5CY8;eOp0;<PDKV4

tests/data/acpi/q35/DSDT.bridge binary +0 -0
index e411d40fd1e297879d78dcf15486dd465ab54568..8e11b8ea4862c8ec27376703c9c43e9895ca60eb 100644
GIT binary patch
tests/data/acpi/q35/DSDT.core-count2 binary +0 -0
index 0603db8cc63cfc562f83e55eaf5162e7c29bf4d1..a895599c3c53c0cd0888ec166a30d6c036d26b93 100644
GIT binary patch

ccmeD9%h>Ukaf1@mWK|{=CWge#9!w5309TO)+W-In

delta 22
dcmeD9%h>Ukaf1>Qa{)u*WF;n*&7Ms5H20o2T1?

tests/data/acpi/q35/DSDT.cphp binary +0 -0
index beeb83c33b385fc8b41d44f299b8d9ba7203d935..725998cb587c02ac963f290bac5c14d665bc85e9 100644
GIT binary patch

acmeBi>2cYh#57rzNrj0aakB^05qSVRh6R=Y

delta 20
bcmeBi>2cYh#Kc^{kT_Y1NoBJq(_wi4LM8?T

tests/data/acpi/q35/DSDT.cxl binary +0 -0
index 3d18b9672d124a0cf11a79e92c396a1b883d0589..04c2c66a25536854b4305787c8e0b41e96c3c133 100644
GIT binary patch
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
index 99a93e12a7faac78e9524ad6758f42c5c0df18eb..ef643b4ee02cacb9a55f89b8e7f05524125515a1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
index 7f7601dbff820044aa646048c0bfe0e6324b9d0d..b136aea961c89a97db09db9b68809979564d8faf 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
index 6c5d1afe443d9261d3b93801711f8d5b267696f3..0970dbd5896fc0038b1369dbbcc982ead7736ae6 100644
GIT binary patch

acmbQ@IK^>;64PW=CKV=z#LXT|K5_s%PX#9c

delta 20
bcmbQ@IK^>;5)*R)L*is5CY8;eOx|(;LHPxh

tests/data/acpi/q35/DSDT.ivrs binary +0 -0
index de7ae27125f9667d7aa7a7cc0e8210773b61a2e2..3aa5c4b3193d32bb8263a1fe06c05b714541c532 100644
GIT binary patch

acmX@>aModi64PW=CKV=z#LXT|ta1QCqXkd^

delta 20
bcmX@>aModi5)*R)L*is5CY8;eOe}H$NxcQW

tests/data/acpi/q35/DSDT.memhp binary +0 -0
index 79bce5c8f0132e72b8e700488ea56c7593737810..9709e5a7a7edcb7509954b553f7bf29a424033db 100644
GIT binary patch
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
index c249929add97439ceb9f891d44c425311517ad18..e1cd01f2349bb8c2f7f8badad11441ffe6d57acc 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index f2f60fdbb3b44ab9adb69bb36e4a80978536af9b..3b9dffb565833cc87bbf08dadfc1f31ac858e93b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
index 9ff9983a80a7487470ccd02ce587200444675816..2cf7f6db0fd8de357278f942a4082e714804dca9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.numamem binary +0 -0
index 1e7c45ef3ccb000a06f64152622b4bd27916d181..310e3d5053b90863f96c29dd69a514b4999b4a19 100644
GIT binary patch
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
index ed47451c44e3041e5b7fed55de7b6ef1aca54350..6672b6fa05c8ee30a8ea4ab0931d59c1315a4e9c 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
index efc2efc19f00ca7564467756616da44f5fd71cfe..eae2dc599331516e11632356f05d7831d1fa1e6a 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
index 675339715f72b4400445ce8c0dd12f416aa0efb0..68c6a7d244cfc78efa6b9cd1385f2134ca149ad7 100644
GIT binary patch
tests/data/acpi/q35/DSDT.viot binary +0 -0
index eeb40b360f7c1de93501e1ddcd7dab306a51113b..4d2937a87c4a39993eaa756f02d59ef35a08f1c2 100644
GIT binary patch

zcmbQ}xzLl#CD<iop$Y>7Bf~~6A4W#e$>EGUg}4G-f_-@x_^?gRVki(~W@Jd1tjeTf z%#c{%=;;#C+>yh;03;Y0k^dUs-2v~Fgc0mKM*j~CNd0CRQ?Xu`@tu*2#rT1{@36 QCuec7E@9lfkm-XW0I$^}K>z>%

delta 101 zcmZ4JInk5LCD<ioq6z~8qtiw%A4W!z$>EGUML7dpf_-@xxUfymVki(~W@JbxUU*- z#H6C(=;;#C+>yh;03;Y0k_o!s-2v~Fgc0mKM*j~CNd0CRQ?Xu}jKGT6M4>4PEw DoVXuG

tests/data/acpi/q35/DSDT.xapic binary +0 -0
index 3aa86f07243f0449c7dc245650715d729744e3ee..e9b4881bdc72eb7c59dcf258c1a98363b46bfbcd 100644
GIT binary patch

dcmbO~jcNWgrVUC=lU12im>3c_doW$^002#l2H*ey

delta 22
ecmbO~jcNWgrVUC=%moaIla-iMHhVH%>i_^$Ug$

Signature · 1 line
2.39.1  
#17 lore raw

Re: [PATCH 14/33] tests: acpi: update expected blobs

Quoted 58 lines · Igor Mammedov
Quoted 45 lines · On Wed, 1 Mar 2023 19:27:33 -0500 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 9 lines · Igor Mammedov

only following context change:
- Local1 = Zero

    If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
    {
        Return (Local0)
 ...
        Return (Local0)
    }
Quoted 4 lines

+ Local1 = Zero
Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]

Nope:

diff -ru -N -IDisassembly -IChecksum '-I* Length ' old/asl/tests/data/acpi/q35/DSDT.viot.dsl new/asl/tests/data/acpi/q35/DSDT.viot.dsl
:--- old/asl/tests/data/acpi/q35/DSDT.viot.dsl 2023-03-01 19:22:57.636454958 -0500 :+++ new/asl/tests/data/acpi/q35/DSDT.viot.dsl 2023-03-01 19:22:58.451460462 -0500 :@@ -148,7 +148,6 @@

                     {
                          0x00                                             // .
                     }
-                Local1 = Zero
                 If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
                 {
                     Return (Local0)
:@@ -159,12 +158,14 @@
                     Return (Local0)
                 }
(quoted diff) +2 -0
+                Local1 = Zero
                 Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]
                     ))
                 If (!((Local2 == Zero) | (Local2 == 0xFFFFFFFF)))
                 {
                     Local1 |= One
                     Local1 |= (One << 0x07)
+                    Local1 |= (One << 0x05)
                 }
 
                 Local0 [Zero] = Local1
Quoted 2 lines

and the funny thing is, the second change is in the expected file but not in the code so this patch causes the test to fail.

above diff is remnants of some old version of the patch before patches were reshuffled.

for some reason q35/viot test gets skipped => no table rebuild => stale DSDT.viot table

reverting recently merged commit c471eb4f40, I can get q35/viot test back:

Quoted 8 lines

commit c471eb4f40445908c1be7bb11a37ac676a0edae7

Author: Fabiano Rosas <[email protected]>
Date:   Wed Feb 8 16:46:57 2023 -0300

tests/qtest: Check for devices in bios-tables-test

so checks aren't working as expected on my host for some reason

Was this a legitimate skip or do we have a bug in the way we check for devices? I.e. did you have CONFIG_VIRTIO_IOMMU in the build?

If we avoid the checks during rebuild and a device is not present in the build anyway, then that QEMU invocation would crash.

#18 lore raw

Re: [PATCH 14/33] tests: acpi: update expected blobs

Quoted 64 lines · On Thu, 02 Mar 2023 09:55:24 -0300 Fabiano Rosas <[email protected]> wrote:
Quoted 62 lines · Igor Mammedov
Quoted 45 lines · On Wed, 1 Mar 2023 19:27:33 -0500 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 9 lines · Igor Mammedov

only following context change:
- Local1 = Zero

    If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
    {
        Return (Local0)
 ...
        Return (Local0)
    }
Quoted 4 lines

+ Local1 = Zero
Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]

Nope:

diff -ru -N -IDisassembly -IChecksum '-I* Length ' old/asl/tests/data/acpi/q35/DSDT.viot.dsl new/asl/tests/data/acpi/q35/DSDT.viot.dsl
:--- old/asl/tests/data/acpi/q35/DSDT.viot.dsl 2023-03-01 19:22:57.636454958 -0500 :+++ new/asl/tests/data/acpi/q35/DSDT.viot.dsl 2023-03-01 19:22:58.451460462 -0500 :@@ -148,7 +148,6 @@

                     {
                          0x00                                             // .
                     }
-                Local1 = Zero
                 If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
                 {
                     Return (Local0)
:@@ -159,12 +158,14 @@
                     Return (Local0)
                 }
(quoted diff) +2 -0
+                Local1 = Zero
                 Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]
                     ))
                 If (!((Local2 == Zero) | (Local2 == 0xFFFFFFFF)))
                 {
                     Local1 |= One
                     Local1 |= (One << 0x07)
+                    Local1 |= (One << 0x05)
                 }
 
                 Local0 [Zero] = Local1
Quoted 2 lines

and the funny thing is, the second change is in the expected file but not in the code so this patch causes the test to fail.

above diff is remnants of some old version of the patch before patches were reshuffled.

for some reason q35/viot test gets skipped => no table rebuild => stale DSDT.viot table

reverting recently merged commit c471eb4f40, I can get q35/viot test back:

commit c471eb4f40445908c1be7bb11a37ac676a0edae7

Author: Fabiano Rosas <[email protected]>
Date:   Wed Feb 8 16:46:57 2023 -0300
Quoted 7 lines
Quoted 4 lines

tests/qtest: Check for devices in bios-tables-test

so checks aren't working as expected on my host for some reason

Was this a legitimate skip or do we have a bug in the way we check for devices? I.e. did you have CONFIG_VIRTIO_IOMMU in the build?

config should be there since with your patch reverted viot test runs and passes just fine so I'd assume it is a bug somewhere in check code

Quoted 2 lines

If we avoid the checks during rebuild and a device is not present in the build anyway, then that QEMU invocation would crash.

I'd take crash anytime vs watching over for successful SKIP,
so we wouldn't end up with stale tables when they should be actually updated like it happened in this case.

#19 lore raw

Re: [PATCH 14/33] tests: acpi: update expected blobs

Quoted 69 lines · Igor Mammedov
Quoted 66 lines · On Thu, 02 Mar 2023 09:55:24 -0300 Fabiano Rosas <[email protected]> wrote:
Quoted 64 lines · Igor Mammedov
Quoted 45 lines · On Wed, 1 Mar 2023 19:27:33 -0500 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 9 lines · Igor Mammedov

only following context change:
- Local1 = Zero

    If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
    {
        Return (Local0)
 ...
        Return (Local0)
    }
Quoted 4 lines

+ Local1 = Zero
Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]

Nope:

diff -ru -N -IDisassembly -IChecksum '-I* Length ' old/asl/tests/data/acpi/q35/DSDT.viot.dsl new/asl/tests/data/acpi/q35/DSDT.viot.dsl
:--- old/asl/tests/data/acpi/q35/DSDT.viot.dsl 2023-03-01 19:22:57.636454958 -0500 :+++ new/asl/tests/data/acpi/q35/DSDT.viot.dsl 2023-03-01 19:22:58.451460462 -0500 :@@ -148,7 +148,6 @@

                     {
                          0x00                                             // .
                     }
-                Local1 = Zero
                 If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
                 {
                     Return (Local0)
:@@ -159,12 +158,14 @@
                     Return (Local0)
                 }
(quoted diff) +2 -0
+                Local1 = Zero
                 Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]
                     ))
                 If (!((Local2 == Zero) | (Local2 == 0xFFFFFFFF)))
                 {
                     Local1 |= One
                     Local1 |= (One << 0x07)
+                    Local1 |= (One << 0x05)
                 }
 
                 Local0 [Zero] = Local1
Quoted 2 lines

and the funny thing is, the second change is in the expected file but not in the code so this patch causes the test to fail.

above diff is remnants of some old version of the patch before patches were reshuffled.

for some reason q35/viot test gets skipped => no table rebuild => stale DSDT.viot table

reverting recently merged commit c471eb4f40, I can get q35/viot test back:

commit c471eb4f40445908c1be7bb11a37ac676a0edae7

Author: Fabiano Rosas <[email protected]>
Date:   Wed Feb 8 16:46:57 2023 -0300

tests/qtest: Check for devices in bios-tables-test

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

so checks aren't working as expected on my host for some reason

Was this a legitimate skip or do we have a bug in the way we check for devices? I.e. did you have CONFIG_VIRTIO_IOMMU in the build?

config should be there since with your patch reverted viot test runs and passes just fine so I'd assume it is a bug somewhere in check code

Probably easier to just revert the patch then. We have stopped building bios-tables-test.c when CONFIG_PARALLEL is not present, so the build --without-default-devices is already covered.

We would only need those checks if PCI_DEVICES=n or one of the individual CONFIGs, which we have discussed previously that is not worth the effort to keep track of.

#20 lore raw

Re: [PATCH 14/33] tests: acpi: update expected blobs

Quoted 81 lines · On Thu, 02 Mar 2023 12:43:11 -0300 Fabiano Rosas <[email protected]> wrote:
Quoted 69 lines · Igor Mammedov
Quoted 66 lines · On Thu, 02 Mar 2023 09:55:24 -0300 Fabiano Rosas <[email protected]> wrote:
Quoted 64 lines · Igor Mammedov
Quoted 45 lines · On Wed, 1 Mar 2023 19:27:33 -0500 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 9 lines · Igor Mammedov

only following context change:
- Local1 = Zero

    If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
    {
        Return (Local0)
 ...
        Return (Local0)
    }
Quoted 4 lines

+ Local1 = Zero
Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]

Nope:

diff -ru -N -IDisassembly -IChecksum '-I* Length ' old/asl/tests/data/acpi/q35/DSDT.viot.dsl new/asl/tests/data/acpi/q35/DSDT.viot.dsl
:--- old/asl/tests/data/acpi/q35/DSDT.viot.dsl 2023-03-01 19:22:57.636454958 -0500 :+++ new/asl/tests/data/acpi/q35/DSDT.viot.dsl 2023-03-01 19:22:58.451460462 -0500 :@@ -148,7 +148,6 @@

                     {
                          0x00                                             // .
                     }
-                Local1 = Zero
                 If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
                 {
                     Return (Local0)
:@@ -159,12 +158,14 @@
                     Return (Local0)
                 }
(quoted diff) +2 -0
+                Local1 = Zero
                 Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]
                     ))
                 If (!((Local2 == Zero) | (Local2 == 0xFFFFFFFF)))
                 {
                     Local1 |= One
                     Local1 |= (One << 0x07)
+                    Local1 |= (One << 0x05)
                 }
 
                 Local0 [Zero] = Local1
Quoted 2 lines

and the funny thing is, the second change is in the expected file but not in the code so this patch causes the test to fail.

above diff is remnants of some old version of the patch before patches were reshuffled.

for some reason q35/viot test gets skipped => no table rebuild => stale DSDT.viot table

reverting recently merged commit c471eb4f40, I can get q35/viot test back:

commit c471eb4f40445908c1be7bb11a37ac676a0edae7

Author: Fabiano Rosas <[email protected]>
Date:   Wed Feb 8 16:46:57 2023 -0300

tests/qtest: Check for devices in bios-tables-test

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

so checks aren't working as expected on my host for some reason

Was this a legitimate skip or do we have a bug in the way we check for devices? I.e. did you have CONFIG_VIRTIO_IOMMU in the build?

config should be there since with your patch reverted viot test runs and passes just fine so I'd assume it is a bug somewhere in check code

Quoted 8 lines

Probably easier to just revert the patch then. We have stopped building bios-tables-test.c when CONFIG_PARALLEL is not present, so the build --without-default-devices is already covered.

We would only need those checks if PCI_DEVICES=n or one of the individual CONFIGs, which we have discussed previously that is not worth the effort to keep track of.

ok, then I'll include revert in on respin

#21 lore raw

Re: [PATCH 14/33] tests: acpi: update expected blobs

In reply to Igor Mammedov
Quoted 41 lines · Igor Mammedov

only following context change:
- Local1 = Zero

    If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
    {
        Return (Local0)
 ...
        Return (Local0)
    }

+ Local1 = Zero
Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]

---
 tests/qtest/bios-tables-test-allowed-diff.h   |  35 ------------------
 tests/data/acpi/pc/DSDT                       | Bin 6360 -> 6360 bytes
 tests/data/acpi/pc/DSDT.acpierst              | Bin 6283 -> 6283 bytes
 tests/data/acpi/pc/DSDT.acpihmat              | Bin 7685 -> 7685 bytes
 tests/data/acpi/pc/DSDT.bridge                | Bin 12487 -> 12487 bytes
 tests/data/acpi/pc/DSDT.cphp                  | Bin 6824 -> 6824 bytes
 tests/data/acpi/pc/DSDT.dimmpxm               | Bin 8014 -> 8014 bytes
 tests/data/acpi/pc/DSDT.hpbridge              | Bin 6323 -> 6323 bytes
 tests/data/acpi/pc/DSDT.ipmikcs               | Bin 6432 -> 6432 bytes
 tests/data/acpi/pc/DSDT.memhp                 | Bin 7719 -> 7719 bytes
 tests/data/acpi/pc/DSDT.nohpet                | Bin 6218 -> 6218 bytes
 tests/data/acpi/pc/DSDT.numamem               | Bin 6366 -> 6366 bytes
 tests/data/acpi/pc/DSDT.roothp                | Bin 9745 -> 9745 bytes
 tests/data/acpi/q35/DSDT                      | Bin 8252 -> 8252 bytes
 tests/data/acpi/q35/DSDT.acpierst             | Bin 8269 -> 8269 bytes
 tests/data/acpi/q35/DSDT.acpihmat             | Bin 9577 -> 9577 bytes
 tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 8531 -> 8531 bytes
 tests/data/acpi/q35/DSDT.applesmc             | Bin 8298 -> 8298 bytes
 tests/data/acpi/q35/DSDT.bridge               | Bin 11481 -> 11481 bytes
 tests/data/acpi/q35/DSDT.core-count2          | Bin 32392 -> 32392 bytes
 tests/data/acpi/q35/DSDT.cphp                 | Bin 8716 -> 8716 bytes
 tests/data/acpi/q35/DSDT.cxl                  | Bin 9578 -> 9578 bytes
 tests/data/acpi/q35/DSDT.dimmpxm              | Bin 9906 -> 9906 bytes
 tests/data/acpi/q35/DSDT.ipmibt               | Bin 8327 -> 8327 bytes
 tests/data/acpi/q35/DSDT.ipmismbus            | Bin 8340 -> 8340 bytes
 tests/data/acpi/q35/DSDT.ivrs                 | Bin 8269 -> 8269 bytes
 tests/data/acpi/q35/DSDT.memhp                | Bin 9611 -> 9611 bytes
Quoted 8 lines
 tests/data/acpi/q35/DSDT.mmio64               | Bin 9382 -> 9382 bytes
 tests/data/acpi/q35/DSDT.multi-bridge         | Bin 12545 -> 12545 bytes
 tests/data/acpi/q35/DSDT.nohpet               | Bin 8110 -> 8110 bytes
 tests/data/acpi/q35/DSDT.numamem              | Bin 8258 -> 8258 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa          | Bin 8353 -> 8353 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12            | Bin 8858 -> 8858 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2             | Bin 8884 -> 8884 bytes
 tests/data/acpi/q35/DSDT.viot                 | Bin 9361 -> 9377 bytes

this one is unfortunately malformed, and tests fail if I apply it.

Quoted 365 lines
 tests/data/acpi/q35/DSDT.xapic                | Bin 35615 -> 35615 bytes
 36 files changed, 35 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -35
index 7e7745db39..dfb8523c8b 100644
@@ -1,36 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/DSDT",
-"tests/data/acpi/pc/DSDT.acpierst",
-"tests/data/acpi/pc/DSDT.acpihmat",
-"tests/data/acpi/pc/DSDT.bridge",
-"tests/data/acpi/pc/DSDT.cphp",
-"tests/data/acpi/pc/DSDT.dimmpxm",
-"tests/data/acpi/pc/DSDT.hpbridge",
-"tests/data/acpi/pc/DSDT.ipmikcs",
-"tests/data/acpi/pc/DSDT.memhp",
-"tests/data/acpi/pc/DSDT.nohpet",
-"tests/data/acpi/pc/DSDT.numamem",
-"tests/data/acpi/pc/DSDT.roothp",
-"tests/data/acpi/q35/DSDT",
-"tests/data/acpi/q35/DSDT.acpierst",
-"tests/data/acpi/q35/DSDT.acpihmat",
-"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
-"tests/data/acpi/q35/DSDT.applesmc",
-"tests/data/acpi/q35/DSDT.bridge",
-"tests/data/acpi/q35/DSDT.core-count2",
-"tests/data/acpi/q35/DSDT.cphp",
-"tests/data/acpi/q35/DSDT.cxl",
-"tests/data/acpi/q35/DSDT.dimmpxm",
-"tests/data/acpi/q35/DSDT.ipmibt",
-"tests/data/acpi/q35/DSDT.ipmismbus",
-"tests/data/acpi/q35/DSDT.ivrs",
-"tests/data/acpi/q35/DSDT.memhp",
-"tests/data/acpi/q35/DSDT.mmio64",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.nohpet",
-"tests/data/acpi/q35/DSDT.numamem",
-"tests/data/acpi/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-"tests/data/acpi/q35/DSDT.viot",
-"tests/data/acpi/q35/DSDT.xapic",
tests/data/acpi/pc/DSDT binary +0 -0
index 0b475fb5a966543fef2cd7672a0b198838a63151..ec133a6d3aabcfd22b7b46019338db2de255da70 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
index 17ef7caeb6fe4445f1234ff060c3db6809184ef6..2b4b7f31919f360e038e37de713639da753f13aa 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
index 675b674eaa92d99513ac243a97064d369791ee53..714a123e7a500cf0f862ff6c4e9a3f50a96af056 100644
GIT binary patch
tests/data/acpi/pc/DSDT.bridge binary +0 -0
index c1ce06136619f55c084a34c51997c059c29cb06a..6c0543cf75ad3e02468ed4925fd3369a183e9b45 100644
GIT binary patch
tests/data/acpi/pc/DSDT.cphp binary +0 -0
index 754ab854dc48fc1af2d335e7269c23a056e66eb8..e1bcb0a4f3ee1269bdd5e949206b40d0e3c076e6 100644
GIT binary patch
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
index 170503336b3fd94cc7a4356003fa080f0ef57b01..1c90e119c5d3dc7e86d04942114e5cfe40de6039 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
index 5dea100bc9492bb2367aac8660522201785c1efb..04e1c20f63be7c6c574e72590332707ca410852a 100644
GIT binary patch
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
index dd7135602709fc4a361930c74f9bebc6b32e6916..3c2aba132f10b5e4a9931877533a9d8f260b7381 100644
GIT binary patch
tests/data/acpi/pc/DSDT.memhp binary +0 -0
index 2f895e9b385c1ae2f58c7ade4de02328b1be7356..811965f42d97adadde6e9ec6d6153e767041bc6d 100644
GIT binary patch
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
index c012b63ace2f359eec0368ed22ef507ee3905c78..bbf73023ade329770ff9f9ac5c897218764182b5 100644
GIT binary patch
tests/data/acpi/pc/DSDT.numamem binary +0 -0
index f2ef4b97290cc58c514c3ce7fd45cb08214d7138..c5d93366a417ad1a92c01659f1db9c159caa7132 100644
GIT binary patch
tests/data/acpi/pc/DSDT.roothp binary +0 -0
index 657c8263f0c649abc806a67576fd74cb32af60c3..9e3d482366bd800cf987044801eebc814629b15b 100644
GIT binary patch
tests/data/acpi/q35/DSDT binary +0 -0
index d68c472b460e4609a64ea67de3c4cebfca76164d..c304e15e366d7317fd0e9db0a144f02e0437d7a1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
index de7ae27125f9667d7aa7a7cc0e8210773b61a2e2..3aa5c4b3193d32bb8263a1fe06c05b714541c532 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
index 48e2862257ac614b5fd6391c4ec425106c48afb1..3ffbf8f83f64144ace17ff5f06bcb4fec9df33d9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat-noinitiator binary +0 -0
index 30a4aa2ec8feb6012a64d476ff37b14717d20eaf..ebec32b575d310f98937fe9208f0c60349ca753d 100644
GIT binary patch
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
index 84e2b5cbc4483ae93634f223160253231dcc4932..b0994644ec811b962e80f49e36e122967f5af1d1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.bridge binary +0 -0
index e411d40fd1e297879d78dcf15486dd465ab54568..8e11b8ea4862c8ec27376703c9c43e9895ca60eb 100644
GIT binary patch
tests/data/acpi/q35/DSDT.core-count2 binary +0 -0
index 0603db8cc63cfc562f83e55eaf5162e7c29bf4d1..a895599c3c53c0cd0888ec166a30d6c036d26b93 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cphp binary +0 -0
index beeb83c33b385fc8b41d44f299b8d9ba7203d935..725998cb587c02ac963f290bac5c14d665bc85e9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cxl binary +0 -0
index 3d18b9672d124a0cf11a79e92c396a1b883d0589..04c2c66a25536854b4305787c8e0b41e96c3c133 100644
GIT binary patch
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
index 99a93e12a7faac78e9524ad6758f42c5c0df18eb..ef643b4ee02cacb9a55f89b8e7f05524125515a1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
index 7f7601dbff820044aa646048c0bfe0e6324b9d0d..b136aea961c89a97db09db9b68809979564d8faf 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
index 6c5d1afe443d9261d3b93801711f8d5b267696f3..0970dbd5896fc0038b1369dbbcc982ead7736ae6 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
index de7ae27125f9667d7aa7a7cc0e8210773b61a2e2..3aa5c4b3193d32bb8263a1fe06c05b714541c532 100644
GIT binary patch
tests/data/acpi/q35/DSDT.memhp binary +0 -0
index 79bce5c8f0132e72b8e700488ea56c7593737810..9709e5a7a7edcb7509954b553f7bf29a424033db 100644
GIT binary patch
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
index c249929add97439ceb9f891d44c425311517ad18..e1cd01f2349bb8c2f7f8badad11441ffe6d57acc 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index f2f60fdbb3b44ab9adb69bb36e4a80978536af9b..3b9dffb565833cc87bbf08dadfc1f31ac858e93b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
index 9ff9983a80a7487470ccd02ce587200444675816..2cf7f6db0fd8de357278f942a4082e714804dca9 100644
GIT binary patch
tests/data/acpi/q35/DSDT.numamem binary +0 -0
index 1e7c45ef3ccb000a06f64152622b4bd27916d181..310e3d5053b90863f96c29dd69a514b4999b4a19 100644
GIT binary patch
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
index ed47451c44e3041e5b7fed55de7b6ef1aca54350..6672b6fa05c8ee30a8ea4ab0931d59c1315a4e9c 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
index efc2efc19f00ca7564467756616da44f5fd71cfe..eae2dc599331516e11632356f05d7831d1fa1e6a 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
index 675339715f72b4400445ce8c0dd12f416aa0efb0..68c6a7d244cfc78efa6b9cd1385f2134ca149ad7 100644
GIT binary patch
tests/data/acpi/q35/DSDT.viot binary +0 -0
index eeb40b360f7c1de93501e1ddcd7dab306a51113b..4d2937a87c4a39993eaa756f02d59ef35a08f1c2 100644
GIT binary patch
tests/data/acpi/q35/DSDT.xapic binary +0 -0
index 3aa86f07243f0449c7dc245650715d729744e3ee..e9b4881bdc72eb7c59dcf258c1a98363b46bfbcd 100644
GIT binary patch
Signature · 2 lines
-- 
2.39.1
#22 lore raw

PATCH 15/33 tests: acpi: whitelist DSDT before adding EDSM method

In reply to Igor Mammedov
---
 tests/qtest/bios-tables-test-allowed-diff.h | 37 +++++++++++++++++++++
 1 file changed, 37 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +37 -0
index dfb8523c8b..8911b10650 100644
@@ -1 +1,38 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/pc/DSDT",
+"tests/data/acpi/pc/DSDT.acpierst",
+"tests/data/acpi/pc/DSDT.acpihmat",
+"tests/data/acpi/pc/DSDT.bridge",
+"tests/data/acpi/pc/DSDT.cphp",
+"tests/data/acpi/pc/DSDT.dimmpxm",
+"tests/data/acpi/pc/DSDT.hpbridge",
+"tests/data/acpi/pc/DSDT.hpbrroot",
+"tests/data/acpi/pc/DSDT.ipmikcs",
+"tests/data/acpi/pc/DSDT.memhp",
+"tests/data/acpi/pc/DSDT.nohpet",
+"tests/data/acpi/pc/DSDT.numamem",
+"tests/data/acpi/pc/DSDT.roothp",
+"tests/data/acpi/q35/DSDT",
+"tests/data/acpi/q35/DSDT.acpierst",
+"tests/data/acpi/q35/DSDT.acpihmat",
+"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
+"tests/data/acpi/q35/DSDT.applesmc",
+"tests/data/acpi/q35/DSDT.bridge",
+"tests/data/acpi/q35/DSDT.core-count2",
+"tests/data/acpi/q35/DSDT.cphp",
+"tests/data/acpi/q35/DSDT.cxl",
+"tests/data/acpi/q35/DSDT.dimmpxm",
+"tests/data/acpi/q35/DSDT.ipmibt",
+"tests/data/acpi/q35/DSDT.ipmismbus",
+"tests/data/acpi/q35/DSDT.ivrs",
+"tests/data/acpi/q35/DSDT.memhp",
+"tests/data/acpi/q35/DSDT.mmio64",
+"tests/data/acpi/q35/DSDT.multi-bridge",
+"tests/data/acpi/q35/DSDT.noacpihp",
+"tests/data/acpi/q35/DSDT.nohpet",
+"tests/data/acpi/q35/DSDT.numamem",
+"tests/data/acpi/q35/DSDT.pvpanic-isa",
+"tests/data/acpi/q35/DSDT.tis.tpm12",
+"tests/data/acpi/q35/DSDT.tis.tpm2",
+"tests/data/acpi/q35/DSDT.viot",
+"tests/data/acpi/q35/DSDT.xapic",
Signature · 1 line
2.39.1
#23 lore raw

PATCH 16/33 acpi: pci: add EDSM method to DSDT

In reply to Igor Mammedov

it's a helper method for acpi-index support on PCI buses that do no support or have disabled ACPI PCI hotplug or for non-hotpluggble endpoint devices.
(like non-hotpluggble NICs, integrated endpoints and later for machines that do not support ACPI PCI hotplug)

no functional change, commit adds only EDSM method in DSDT without any users. (the follow up patches will use it)

---
 hw/i386/acpi-build.c | 54 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
hw/i386/acpi-build.c +54 -0
index cb80b7a318..8db65663fc 100644
@@ -398,6 +398,58 @@ static void build_append_pci_dsm_func0_common(Aml *ctx, Aml *retvar)
     aml_append(ctx, ifctx1);
 }
 
+static Aml *aml_pci_edsm(void)
+{
+    Aml *method, *ifctx;
+    Aml *zero = aml_int(0);
+    Aml *func = aml_arg(2);
+    Aml *ret = aml_local(0);
+    Aml *aidx = aml_local(1);
+    Aml *params = aml_arg(4);
+
+    method = aml_method("EDSM", 5, AML_SERIALIZED);
+
+    /* get supported functions */
+    ifctx = aml_if(aml_equal(func, zero));
+    {
+        /* 1: have supported functions */
+        /* 7: support for function 7 */
+        const uint8_t caps = 1 | BIT(7);
+        build_append_pci_dsm_func0_common(ifctx, ret);
+        aml_append(ifctx, aml_store(aml_int(caps), aml_index(ret, zero)));
+        aml_append(ifctx, aml_return(ret));
+    }
+    aml_append(method, ifctx);
+
+    /* handle specific functions requests */
+    /*
+     * PCI Firmware Specification 3.1
+     * 4.6.7. _DSM for Naming a PCI or PCI Express Device Under
+     *        Operating Systems
+     */
+    ifctx = aml_if(aml_equal(func, aml_int(7)));
+    {
+       Aml *pkg = aml_package(2);
+       aml_append(pkg, zero);
+       /* optional, if not impl. should return null string */
+       aml_append(pkg, aml_string("%s", ""));
+       aml_append(ifctx, aml_store(pkg, ret));
+
+       /*
+        * IASL is fine when initializing Package with computational data,
+        * however it makes guest unhappy /it fails to process such AML/.
+        * So use runtime assignment to set acpi-index after initializer
+        * to make OSPM happy.
+        */
+       aml_append(ifctx,
+           aml_store(aml_derefof(aml_index(params, aml_int(0))), aidx));
+       aml_append(ifctx, aml_store(aidx, aml_index(ret, zero)));
+       aml_append(ifctx, aml_return(ret));
+    }
+    aml_append(method, ifctx);
+
+    return method;
+}
 
 static void build_append_pcihp_notify_entry(Aml *method, int slot)
 {
@@ -1397,6 +1449,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
         aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03")));
         aml_append(dev, aml_name_decl("_ADR", aml_int(0)));
         aml_append(dev, aml_name_decl("_UID", aml_int(pcmc->pci_root_uid)));
+        aml_append(dev, aml_pci_edsm());
         aml_append(sb_scope, dev);
         aml_append(dsdt, sb_scope);
 
@@ -1412,6 +1465,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
         aml_append(dev, aml_name_decl("_ADR", aml_int(0)));
         aml_append(dev, aml_name_decl("_UID", aml_int(pcmc->pci_root_uid)));
         aml_append(dev, build_q35_osc_method(!pm->pcihp_bridge_en));
+        aml_append(dev, aml_pci_edsm());
         aml_append(sb_scope, dev);
         if (mcfg_valid) {
             aml_append(sb_scope, build_q35_dram_controller(&mcfg));
Signature · 1 line
2.39.1
#24 lore raw

PATCH 17/33 tests: acpi: update expected blobs

In reply to Igor Mammedov
---
 tests/qtest/bios-tables-test-allowed-diff.h   |  37 ------------------
 tests/data/acpi/pc/DSDT                       | Bin 6360 -> 6454 bytes
 tests/data/acpi/pc/DSDT.acpierst              | Bin 6283 -> 6377 bytes
 tests/data/acpi/pc/DSDT.acpihmat              | Bin 7685 -> 7779 bytes
 tests/data/acpi/pc/DSDT.bridge                | Bin 12487 -> 12581 bytes
 tests/data/acpi/pc/DSDT.cphp                  | Bin 6824 -> 6918 bytes
 tests/data/acpi/pc/DSDT.dimmpxm               | Bin 8014 -> 8108 bytes
 tests/data/acpi/pc/DSDT.hpbridge              | Bin 6323 -> 6417 bytes
 tests/data/acpi/pc/DSDT.hpbrroot              | Bin 3166 -> 3260 bytes
 tests/data/acpi/pc/DSDT.ipmikcs               | Bin 6432 -> 6526 bytes
 tests/data/acpi/pc/DSDT.memhp                 | Bin 7719 -> 7813 bytes
 tests/data/acpi/pc/DSDT.nohpet                | Bin 6218 -> 6312 bytes
 tests/data/acpi/pc/DSDT.numamem               | Bin 6366 -> 6460 bytes
 tests/data/acpi/pc/DSDT.roothp                | Bin 9745 -> 9839 bytes
 tests/data/acpi/q35/DSDT                      | Bin 8252 -> 8344 bytes
 tests/data/acpi/q35/DSDT.acpierst             | Bin 8269 -> 8361 bytes
 tests/data/acpi/q35/DSDT.acpihmat             | Bin 9577 -> 9669 bytes
 tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 8531 -> 8623 bytes
 tests/data/acpi/q35/DSDT.applesmc             | Bin 8298 -> 8390 bytes
 tests/data/acpi/q35/DSDT.bridge               | Bin 11481 -> 11573 bytes
 tests/data/acpi/q35/DSDT.core-count2          | Bin 32392 -> 32484 bytes
 tests/data/acpi/q35/DSDT.cphp                 | Bin 8716 -> 8808 bytes
 tests/data/acpi/q35/DSDT.cxl                  | Bin 9578 -> 9670 bytes
 tests/data/acpi/q35/DSDT.dimmpxm              | Bin 9906 -> 9998 bytes
 tests/data/acpi/q35/DSDT.ipmibt               | Bin 8327 -> 8419 bytes
 tests/data/acpi/q35/DSDT.ipmismbus            | Bin 8340 -> 8432 bytes
 tests/data/acpi/q35/DSDT.ivrs                 | Bin 8269 -> 8361 bytes
 tests/data/acpi/q35/DSDT.memhp                | Bin 9611 -> 9703 bytes
 tests/data/acpi/q35/DSDT.mmio64               | Bin 9382 -> 9474 bytes
 tests/data/acpi/q35/DSDT.multi-bridge         | Bin 12545 -> 12637 bytes
 tests/data/acpi/q35/DSDT.noacpihp             | Bin 8022 -> 8114 bytes
 tests/data/acpi/q35/DSDT.nohpet               | Bin 8110 -> 8202 bytes
 tests/data/acpi/q35/DSDT.numamem              | Bin 8258 -> 8350 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa          | Bin 8353 -> 8445 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12            | Bin 8858 -> 8950 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2             | Bin 8884 -> 8976 bytes
 tests/data/acpi/q35/DSDT.viot                 | Bin 9377 -> 9469 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35615 -> 35707 bytes
 38 files changed, 37 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -37
index 8911b10650..dfb8523c8b 100644
@@ -1,38 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/DSDT",
-"tests/data/acpi/pc/DSDT.acpierst",
-"tests/data/acpi/pc/DSDT.acpihmat",
-"tests/data/acpi/pc/DSDT.bridge",
-"tests/data/acpi/pc/DSDT.cphp",
-"tests/data/acpi/pc/DSDT.dimmpxm",
-"tests/data/acpi/pc/DSDT.hpbridge",
-"tests/data/acpi/pc/DSDT.hpbrroot",
-"tests/data/acpi/pc/DSDT.ipmikcs",
-"tests/data/acpi/pc/DSDT.memhp",
-"tests/data/acpi/pc/DSDT.nohpet",
-"tests/data/acpi/pc/DSDT.numamem",
-"tests/data/acpi/pc/DSDT.roothp",
-"tests/data/acpi/q35/DSDT",
-"tests/data/acpi/q35/DSDT.acpierst",
-"tests/data/acpi/q35/DSDT.acpihmat",
-"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
-"tests/data/acpi/q35/DSDT.applesmc",
-"tests/data/acpi/q35/DSDT.bridge",
-"tests/data/acpi/q35/DSDT.core-count2",
-"tests/data/acpi/q35/DSDT.cphp",
-"tests/data/acpi/q35/DSDT.cxl",
-"tests/data/acpi/q35/DSDT.dimmpxm",
-"tests/data/acpi/q35/DSDT.ipmibt",
-"tests/data/acpi/q35/DSDT.ipmismbus",
-"tests/data/acpi/q35/DSDT.ivrs",
-"tests/data/acpi/q35/DSDT.memhp",
-"tests/data/acpi/q35/DSDT.mmio64",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.noacpihp",
-"tests/data/acpi/q35/DSDT.nohpet",
-"tests/data/acpi/q35/DSDT.numamem",
-"tests/data/acpi/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-"tests/data/acpi/q35/DSDT.viot",
-"tests/data/acpi/q35/DSDT.xapic",
tests/data/acpi/pc/DSDT binary +0 -0
index ec133a6d3aabcfd22b7b46019338db2de255da70..521062a756d1fcd5939683e41071d29407a45b22 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
index 2b4b7f31919f360e038e37de713639da753f13aa..12b9e94bf1449995d460edffd40d1ff7b9f292cc 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
index 714a123e7a500cf0f862ff6c4e9a3f50a96af056..876d0184d8d56cc2fc9d4c0a619d5d449ba81687 100644
GIT binary patch
tests/data/acpi/pc/DSDT.bridge binary +0 -0
index 6c0543cf75ad3e02468ed4925fd3369a183e9b45..219ddba2713015616e41c19f66d891c63b05e4ab 100644
GIT binary patch
tests/data/acpi/pc/DSDT.cphp binary +0 -0
index e1bcb0a4f3ee1269bdd5e949206b40d0e3c076e6..5b5b352a13947a48f98e46409b9ad9664b4de9bc 100644
GIT binary patch
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
index 1c90e119c5d3dc7e86d04942114e5cfe40de6039..fbe755975d94e5e607820bb7acb2fb189b1105ee 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
index 04e1c20f63be7c6c574e72590332707ca410852a..12d7daf950ba93deaeb67655d303df3960569a64 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbrroot binary +0 -0
index 893ab221c2cca1829937a4c26152680313633df4..bfe0bf37180c0f0521d264d3e35b5f51feff2630 100644
GIT binary patch
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
index 3c2aba132f10b5e4a9931877533a9d8f260b7381..3a19ce439825c2aa97adee3a965ac050dec6f2d0 100644
GIT binary patch
tests/data/acpi/pc/DSDT.memhp binary +0 -0
index 811965f42d97adadde6e9ec6d6153e767041bc6d..8ad5c523fdf76b90286a145f797454dff6da050c 100644
GIT binary patch
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
index bbf73023ade329770ff9f9ac5c897218764182b5..4fd4d38e5ffe889fed812b67d3d7b1825325e909 100644
GIT binary patch
tests/data/acpi/pc/DSDT.numamem binary +0 -0
index c5d93366a417ad1a92c01659f1db9c159caa7132..4cfb3765c5c5c7cf73732f2d3fd5bf9932399c14 100644
GIT binary patch
tests/data/acpi/pc/DSDT.roothp binary +0 -0
index 9e3d482366bd800cf987044801eebc814629b15b..8b695cca83c04b4123986e1334d0c57ddb22687d 100644
GIT binary patch
tests/data/acpi/q35/DSDT binary +0 -0
index c304e15e366d7317fd0e9db0a144f02e0437d7a1..3dadeba912d9133f0ccb6e9b89a22ca7dc43f18f 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
index 3aa5c4b3193d32bb8263a1fe06c05b714541c532..7e43fa88c39737198427744ddb8d902edd517794 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
index 3ffbf8f83f64144ace17ff5f06bcb4fec9df33d9..7c626642ba1ef231ee4e1353330ca9ae2955f37f 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat-noinitiator binary +0 -0
index ebec32b575d310f98937fe9208f0c60349ca753d..631a1048fc01a3c84aadfdea8e0eccc36c68d8a4 100644
GIT binary patch
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
index b0994644ec811b962e80f49e36e122967f5af1d1..cb117fd671effe2557a41115015b57df87d7936b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.bridge binary +0 -0
index 8e11b8ea4862c8ec27376703c9c43e9895ca60eb..cdfd51ce70d7201fa827bfabfd23e413596b1094 100644
GIT binary patch
tests/data/acpi/q35/DSDT.core-count2 binary +0 -0
index a895599c3c53c0cd0888ec166a30d6c036d26b93..2bf77bb4e1a433eab66d0fdd175344d4f8d6e168 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cphp binary +0 -0
index 725998cb587c02ac963f290bac5c14d665bc85e9..1837442bd39f1249fb753530ea508d05e8d177f4 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cxl binary +0 -0
index 04c2c66a25536854b4305787c8e0b41e96c3c133..023da0665f9123943e23fd771725f4b8eb937135 100644
GIT binary patch
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
index ef643b4ee02cacb9a55f89b8e7f05524125515a1..2ad9b1c30e9a583cc43e8efbc1e276b4f221ff28 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
index b136aea961c89a97db09db9b68809979564d8faf..c552e668983198d077348a57a5b22065d01b40f1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
index 0970dbd5896fc0038b1369dbbcc982ead7736ae6..9fe6d1686a777ffddc2953420cd4838832226bad 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
index 3aa5c4b3193d32bb8263a1fe06c05b714541c532..7e43fa88c39737198427744ddb8d902edd517794 100644
GIT binary patch
tests/data/acpi/q35/DSDT.memhp binary +0 -0
index 9709e5a7a7edcb7509954b553f7bf29a424033db..a98ee8c7731c8aaf383e84fd48b90633e53ef240 100644
GIT binary patch
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
index e1cd01f2349bb8c2f7f8badad11441ffe6d57acc..61e994d2651e15e232d9b5930bca32a33fd0b090 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index 3b9dffb565833cc87bbf08dadfc1f31ac858e93b..1240cede1a2fedc902b9dc71687880b73170e81b 100644
GIT binary patch
tests/data/acpi/q35/DSDT.noacpihp binary +0 -0
index 4ea982de2df3cf7cd89cb3b4467a350eaf8f5d29..44ee5e74c533f2c7554885b73adb947ed74b421f 100644
GIT binary patch
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
index 2cf7f6db0fd8de357278f942a4082e714804dca9..be3060aa51d67c0f02c70bd0a7d5c028016641a1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.numamem binary +0 -0
index 310e3d5053b90863f96c29dd69a514b4999b4a19..5e94a2b61f840c68d27257831cf608d41ee7c154 100644
GIT binary patch
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
index 6672b6fa05c8ee30a8ea4ab0931d59c1315a4e9c..0e609a0c48fef371f935f239ebb9620fa116b049 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
index eae2dc599331516e11632356f05d7831d1fa1e6a..fc6cc4585a6b1d955bc80700ec2dc2720b7e4a89 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
index 68c6a7d244cfc78efa6b9cd1385f2134ca149ad7..815006e445d0ec44c2f4a7c8d30ead6616a32b32 100644
GIT binary patch
tests/data/acpi/q35/DSDT.viot binary +0 -0
index 4d2937a87c4a39993eaa756f02d59ef35a08f1c2..a53b3135c85b0908a794f93c7f2e5d3720b79a7d 100644
GIT binary patch
tests/data/acpi/q35/DSDT.xapic binary +0 -0
index e9b4881bdc72eb7c59dcf258c1a98363b46bfbcd..8cf5b9703d617d0a0b16d41cd713f7883c80fcfe 100644
GIT binary patch
Signature · 1 line
2.39.1
#25 lore raw

PATCH 18/33 tests: acpi: whitelist DSDT before adding device with acpi-index to testcases

In reply to Igor Mammedov
---
 tests/qtest/bios-tables-test-allowed-diff.h | 3 +++
 1 file changed, 3 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +3 -0
index dfb8523c8b..70244976c9 100644
@@ -1 +1,4 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/pc/DSDT.hpbrroot",
+"tests/data/acpi/q35/DSDT.multi-bridge",
+"tests/data/acpi/q35/DSDT.noacpihp",
Signature · 1 line
2.39.1
#26 lore raw

PATCH 19/33 tests: acpi: add device with acpi-index on non-hotpluggble bus

In reply to Igor Mammedov
---
 tests/qtest/bios-tables-test.c | 1 +
 1 file changed, 1 insertion(+)
tests/qtest/bios-tables-test.c +1 -0
index 638a193e13..88493abc40 100644
@@ -1060,6 +1060,7 @@ static void test_acpi_q35_multif_bridge(void)
         " -device pcie-root-port,id=rphptgt3,port=0x0,chassis=7,addr=2.3"
         " -device pci-testdev,bus=pcie.0,addr=2.4"
         " -device pci-testdev,bus=pcie.0,addr=5.0"
+        " -device pci-testdev,bus=pcie.0,addr=0xf.0,acpi-index=101"
         " -device pci-testdev,bus=rp0,addr=0.0"
         " -device pci-testdev,bus=br1"
         " -device pcie-root-port,id=rpnohp,chassis=8,addr=0xA.0,hotplug=off"
Signature · 1 line
2.39.1
#27 lore raw

PATCH 20/33 acpi: pci: support acpi-index for non-hotpluggable devices

In reply to Igor Mammedov

Inject static _DSM (EDSM) if non-hotpluggable device has acpi-index configured on it.
It lets use acpi-index non-hotpluggable devices / devices attached to non-hotpluggable bus.

---
 hw/i386/acpi-build.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
hw/i386/acpi-build.c +25 -0
index 8db65663fc..c33b43a358 100644
@@ -451,6 +451,25 @@ static Aml *aml_pci_edsm(void)
     return method;
 }
 
+static Aml *aml_pci_static_endpoint_dsm(PCIDevice *pdev)
+{
+    Aml *method;
+
+    g_assert(pdev->acpi_index != 0);
+    method = aml_method("_DSM", 4, AML_SERIALIZED);
+    {
+        Aml *params = aml_local(0);
+        Aml *pkg = aml_package(1);
+        aml_append(pkg, aml_int(pdev->acpi_index));
+        aml_append(method, aml_store(pkg, params));
+        aml_append(method,
+            aml_return(aml_call5("EDSM", aml_arg(0), aml_arg(1),
+                                 aml_arg(2), aml_arg(3), params))
+        );
+    }
+    return method;
+}
+
 static void build_append_pcihp_notify_entry(Aml *method, int slot)
 {
     Aml *if_ctx;
@@ -576,6 +595,12 @@ void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus)
         aml_append(dev, aml_name_decl("_ADR", aml_int(adr)));
 
         call_dev_aml_func(DEVICE(bus->devices[devfn]), dev);
+        /* add _DSM if device has acpi-index set */
+        if (pdev->acpi_index && !bsel &&
+            !object_property_get_bool(OBJECT(pdev), "hotpluggable",
+                                      &error_abort)) {
+            aml_append(dev, aml_pci_static_endpoint_dsm(pdev));
+        }
 
         /* device descriptor has been composed, add it into parent context */
         aml_append(parent_scope, dev);
Signature · 1 line
2.39.1
#28 lore raw

PATCH 21/33 tests: acpi: update expected blobs

In reply to Igor Mammedov

the only chenge is addition of _DSM- > EDSM method on non-hotpluggable devices with configured acpi-index. Something like:

+ Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
+ {
+ Local0 = Package (0x01)
+ {
+ 0x65
+ }
+ Return (EDSM (Arg0, Arg1, Arg2, Arg3, Local0))
+ }

---
 tests/qtest/bios-tables-test-allowed-diff.h |   3 ---
 tests/data/acpi/pc/DSDT.hpbrroot            | Bin 3260 -> 3309 bytes
 tests/data/acpi/q35/DSDT.multi-bridge       | Bin 12637 -> 12678 bytes
 tests/data/acpi/q35/DSDT.noacpihp           | Bin 8114 -> 8188 bytes
 4 files changed, 3 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -3
index 70244976c9..dfb8523c8b 100644
@@ -1,4 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/DSDT.hpbrroot",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.noacpihp",
tests/data/acpi/pc/DSDT.hpbrroot binary +0 -0
index bfe0bf37180c0f0521d264d3e35b5f51feff2630..bee88c5ee815f0acf022b278876f0a212b1da84a 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index 1240cede1a2fedc902b9dc71687880b73170e81b..595ab64601ae3deb12bbf18ca463e39ba0a86195 100644
GIT binary patch
tests/data/acpi/q35/DSDT.noacpihp binary +0 -0
index 44ee5e74c533f2c7554885b73adb947ed74b421f..c292c2369b011b779af44d0fa6fd2f7994098b2e 100644
GIT binary patch
Signature · 1 line
2.39.1
#29 lore raw

PATCH 22/33 tests: acpi: whitelist DSDT before exposing non zero functions

In reply to Igor Mammedov
---
 tests/qtest/bios-tables-test-allowed-diff.h | 37 +++++++++++++++++++++
 1 file changed, 37 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +37 -0
index dfb8523c8b..8911b10650 100644
@@ -1 +1,38 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/pc/DSDT",
+"tests/data/acpi/pc/DSDT.acpierst",
+"tests/data/acpi/pc/DSDT.acpihmat",
+"tests/data/acpi/pc/DSDT.bridge",
+"tests/data/acpi/pc/DSDT.cphp",
+"tests/data/acpi/pc/DSDT.dimmpxm",
+"tests/data/acpi/pc/DSDT.hpbridge",
+"tests/data/acpi/pc/DSDT.hpbrroot",
+"tests/data/acpi/pc/DSDT.ipmikcs",
+"tests/data/acpi/pc/DSDT.memhp",
+"tests/data/acpi/pc/DSDT.nohpet",
+"tests/data/acpi/pc/DSDT.numamem",
+"tests/data/acpi/pc/DSDT.roothp",
+"tests/data/acpi/q35/DSDT",
+"tests/data/acpi/q35/DSDT.acpierst",
+"tests/data/acpi/q35/DSDT.acpihmat",
+"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
+"tests/data/acpi/q35/DSDT.applesmc",
+"tests/data/acpi/q35/DSDT.bridge",
+"tests/data/acpi/q35/DSDT.core-count2",
+"tests/data/acpi/q35/DSDT.cphp",
+"tests/data/acpi/q35/DSDT.cxl",
+"tests/data/acpi/q35/DSDT.dimmpxm",
+"tests/data/acpi/q35/DSDT.ipmibt",
+"tests/data/acpi/q35/DSDT.ipmismbus",
+"tests/data/acpi/q35/DSDT.ivrs",
+"tests/data/acpi/q35/DSDT.memhp",
+"tests/data/acpi/q35/DSDT.mmio64",
+"tests/data/acpi/q35/DSDT.multi-bridge",
+"tests/data/acpi/q35/DSDT.noacpihp",
+"tests/data/acpi/q35/DSDT.nohpet",
+"tests/data/acpi/q35/DSDT.numamem",
+"tests/data/acpi/q35/DSDT.pvpanic-isa",
+"tests/data/acpi/q35/DSDT.tis.tpm12",
+"tests/data/acpi/q35/DSDT.tis.tpm2",
+"tests/data/acpi/q35/DSDT.viot",
+"tests/data/acpi/q35/DSDT.xapic",
Signature · 1 line
2.39.1
#30 lore raw

PATCH 23/33 acpi: pci: describe all functions on populated slots

In reply to Igor Mammedov

describing all present devices on functions other than 0 was complicated when non hotplug and hotplug code was intermixed. So QEMU has been excluding non zero functions since they are not supported by hotplug code, then a condition to whitelist coldplugged bridges was added and later whitelisting of devices that advertise presence of their own AML description.

With non hotplug and hotplug code separated, it is possible to relax rules and allow describing all non-hotpluggble functions and hence simplify conditions whether PCI device should be enumerated by generic (non-hotplug) code.

Price of that simplification is an extra few Device() descriptors in DSDT exposing built-in chipset functions, which has no functional effect on guest side.

Apart from that, the enumeration of non zero functions, allows to attach more NICs with acpi-index enabled directly on hostbridge (if hotplug is not required).

---
* patch is making acpi-index feature support complete in the scope of host bridge (support of acpi-index on PXB is out of scope of this series, and probably should follow host-bridge clean up)
* follow up patch will add a tests case with acpi-index enabled PCI device on non zero function to demonstrate that.

---
 hw/i386/acpi-build.c | 6 ------
 1 file changed, 6 deletions(-)
hw/i386/acpi-build.c +0 -6
index c33b43a358..7b982b6072 100644
@@ -493,12 +493,6 @@ static bool is_devfn_ignored_generic(const int devfn, const PCIBus *bus)
             if (DEVICE(pdev)->hotplugged) {
                 return true;
             }
-        } 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)
-             */
-            return true;
         }
     }
     return false;
Signature · 1 line
2.39.1
#31 lore raw

PATCH 24/33 tests: acpi: update expected blobs

In reply to Igor Mammedov

in PC machine case piix3-ide and PIIX4_PM get exposed

+ Device (S09)
+ {
+ Name (_ADR, 0x00010001) // _ADR: Address
+ }
+
+ Device (S0B)
+ {
+ Name (_ADR, 0x00010003) // _ADR: Address
+ }

in q35 machine case ich9-ahci gets exposed
+ Device (SFA)
+ {
+ Name (_ADR, 0x001F0002) // _ADR: Address
+ }

and addtional pci-testdev, virtio-balloon exposed in q35 multi-bridge test case
+ Device (S14)
+ {
+ Name (_ADR, 0x00020004) // _ADR: Address
+ }
+
...
+ Device (S22)
+ {
+ Name (_ADR, 0x00040002) // _ADR: Address
+ }

---
 tests/qtest/bios-tables-test-allowed-diff.h   |  37 ------------------
 tests/data/acpi/pc/DSDT                       | Bin 6454 -> 6488 bytes
 tests/data/acpi/pc/DSDT.acpierst              | Bin 6377 -> 6411 bytes
 tests/data/acpi/pc/DSDT.acpihmat              | Bin 7779 -> 7813 bytes
 tests/data/acpi/pc/DSDT.bridge                | Bin 12581 -> 12615 bytes
 tests/data/acpi/pc/DSDT.cphp                  | Bin 6918 -> 6952 bytes
 tests/data/acpi/pc/DSDT.dimmpxm               | Bin 8108 -> 8142 bytes
 tests/data/acpi/pc/DSDT.hpbridge              | Bin 6417 -> 6451 bytes
 tests/data/acpi/pc/DSDT.hpbrroot              | Bin 3309 -> 3343 bytes
 tests/data/acpi/pc/DSDT.ipmikcs               | Bin 6526 -> 6560 bytes
 tests/data/acpi/pc/DSDT.memhp                 | Bin 7813 -> 7847 bytes
 tests/data/acpi/pc/DSDT.nohpet                | Bin 6312 -> 6346 bytes
 tests/data/acpi/pc/DSDT.numamem               | Bin 6460 -> 6494 bytes
 tests/data/acpi/pc/DSDT.roothp                | Bin 9839 -> 9873 bytes
 tests/data/acpi/q35/DSDT                      | Bin 8344 -> 8361 bytes
 tests/data/acpi/q35/DSDT.acpierst             | Bin 8361 -> 8378 bytes
 tests/data/acpi/q35/DSDT.acpihmat             | Bin 9669 -> 9686 bytes
 tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 8623 -> 8640 bytes
 tests/data/acpi/q35/DSDT.applesmc             | Bin 8390 -> 8407 bytes
 tests/data/acpi/q35/DSDT.bridge               | Bin 11573 -> 11590 bytes
 tests/data/acpi/q35/DSDT.core-count2          | Bin 32484 -> 32501 bytes
 tests/data/acpi/q35/DSDT.cphp                 | Bin 8808 -> 8825 bytes
 tests/data/acpi/q35/DSDT.cxl                  | Bin 9670 -> 9687 bytes
 tests/data/acpi/q35/DSDT.dimmpxm              | Bin 9998 -> 10015 bytes
 tests/data/acpi/q35/DSDT.ipmibt               | Bin 8419 -> 8436 bytes
 tests/data/acpi/q35/DSDT.ipmismbus            | Bin 8432 -> 8449 bytes
 tests/data/acpi/q35/DSDT.ivrs                 | Bin 8361 -> 8378 bytes
 tests/data/acpi/q35/DSDT.memhp                | Bin 9703 -> 9720 bytes
 tests/data/acpi/q35/DSDT.mmio64               | Bin 9474 -> 9491 bytes
 tests/data/acpi/q35/DSDT.multi-bridge         | Bin 12678 -> 12729 bytes
 tests/data/acpi/q35/DSDT.noacpihp             | Bin 8188 -> 8205 bytes
 tests/data/acpi/q35/DSDT.nohpet               | Bin 8202 -> 8219 bytes
 tests/data/acpi/q35/DSDT.numamem              | Bin 8350 -> 8367 bytes
 tests/data/acpi/q35/DSDT.pvpanic-isa          | Bin 8445 -> 8462 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12            | Bin 8950 -> 8967 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2             | Bin 8976 -> 8993 bytes
 tests/data/acpi/q35/DSDT.viot                 | Bin 9469 -> 9486 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35707 -> 35724 bytes
 38 files changed, 37 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -37
index 8911b10650..dfb8523c8b 100644
@@ -1,38 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/pc/DSDT",
-"tests/data/acpi/pc/DSDT.acpierst",
-"tests/data/acpi/pc/DSDT.acpihmat",
-"tests/data/acpi/pc/DSDT.bridge",
-"tests/data/acpi/pc/DSDT.cphp",
-"tests/data/acpi/pc/DSDT.dimmpxm",
-"tests/data/acpi/pc/DSDT.hpbridge",
-"tests/data/acpi/pc/DSDT.hpbrroot",
-"tests/data/acpi/pc/DSDT.ipmikcs",
-"tests/data/acpi/pc/DSDT.memhp",
-"tests/data/acpi/pc/DSDT.nohpet",
-"tests/data/acpi/pc/DSDT.numamem",
-"tests/data/acpi/pc/DSDT.roothp",
-"tests/data/acpi/q35/DSDT",
-"tests/data/acpi/q35/DSDT.acpierst",
-"tests/data/acpi/q35/DSDT.acpihmat",
-"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
-"tests/data/acpi/q35/DSDT.applesmc",
-"tests/data/acpi/q35/DSDT.bridge",
-"tests/data/acpi/q35/DSDT.core-count2",
-"tests/data/acpi/q35/DSDT.cphp",
-"tests/data/acpi/q35/DSDT.cxl",
-"tests/data/acpi/q35/DSDT.dimmpxm",
-"tests/data/acpi/q35/DSDT.ipmibt",
-"tests/data/acpi/q35/DSDT.ipmismbus",
-"tests/data/acpi/q35/DSDT.ivrs",
-"tests/data/acpi/q35/DSDT.memhp",
-"tests/data/acpi/q35/DSDT.mmio64",
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.noacpihp",
-"tests/data/acpi/q35/DSDT.nohpet",
-"tests/data/acpi/q35/DSDT.numamem",
-"tests/data/acpi/q35/DSDT.pvpanic-isa",
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
-"tests/data/acpi/q35/DSDT.viot",
-"tests/data/acpi/q35/DSDT.xapic",
tests/data/acpi/pc/DSDT binary +0 -0
index 521062a756d1fcd5939683e41071d29407a45b22..32d255cfc0a207c89bf8459edaca11fad12979e9 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
index 12b9e94bf1449995d460edffd40d1ff7b9f292cc..33e872b2fae3d974a3dc4ec0401b1f1734db313b 100644
GIT binary patch
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
index 876d0184d8d56cc2fc9d4c0a619d5d449ba81687..cd84abc1b1d026e6055057f4c6170146e1921ea6 100644
GIT binary patch
tests/data/acpi/pc/DSDT.bridge binary +0 -0
index 219ddba2713015616e41c19f66d891c63b05e4ab..69a73ea2a691de387b82bf85a7ba1a2279c01a0c 100644
GIT binary patch
tests/data/acpi/pc/DSDT.cphp binary +0 -0
index 5b5b352a13947a48f98e46409b9ad9664b4de9bc..20379056b399bf1ad8b8316453eac344f604d3b6 100644
GIT binary patch
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
index fbe755975d94e5e607820bb7acb2fb189b1105ee..435496e836939eeb767f1a524dc1471740ad917e 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
index 12d7daf950ba93deaeb67655d303df3960569a64..b6eafab250d508e1358ea09f81eb1b2a6d96ce32 100644
GIT binary patch
tests/data/acpi/pc/DSDT.hpbrroot binary +0 -0
index bee88c5ee815f0acf022b278876f0a212b1da84a..a4073f36d686201296455e142e3bcbb2f368bbd2 100644
GIT binary patch
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
index 3a19ce439825c2aa97adee3a965ac050dec6f2d0..06aa7bfdeca40e10ee8411eeda08486599b90e39 100644
GIT binary patch
tests/data/acpi/pc/DSDT.memhp binary +0 -0
index 8ad5c523fdf76b90286a145f797454dff6da050c..10a0e44d610976cd5f08d53ec32c7d5eda064e1c 100644
GIT binary patch
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
index 4fd4d38e5ffe889fed812b67d3d7b1825325e909..6905312d827502e8bb5852418cf58290eda8d86b 100644
GIT binary patch
tests/data/acpi/pc/DSDT.numamem binary +0 -0
index 4cfb3765c5c5c7cf73732f2d3fd5bf9932399c14..59e31338eeb3a84c39ed3ae63105226ce2ad1125 100644
GIT binary patch
tests/data/acpi/pc/DSDT.roothp binary +0 -0
index 8b695cca83c04b4123986e1334d0c57ddb22687d..448d596cf413d7e487af114e5c80bc73311d17f9 100644
GIT binary patch
tests/data/acpi/q35/DSDT binary +0 -0
index 3dadeba912d9133f0ccb6e9b89a22ca7dc43f18f..720e8cbbbb10d86a458027b5cb47884bf8c5ee78 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
index 7e43fa88c39737198427744ddb8d902edd517794..f26b1f2a19529c508d53ed3f434be0083c18dbab 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
index 7c626642ba1ef231ee4e1353330ca9ae2955f37f..86771f17466a85e3c938e86d1a5c6cee7c0ec4b6 100644
GIT binary patch
tests/data/acpi/q35/DSDT.acpihmat-noinitiator binary +0 -0
index 631a1048fc01a3c84aadfdea8e0eccc36c68d8a4..a894a2d16c81fff8ade2c5ddb20858a03169fd47 100644
GIT binary patch
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
index cb117fd671effe2557a41115015b57df87d7936b..276ae1df511346ccd286216c6de03cd56db410fd 100644
GIT binary patch
tests/data/acpi/q35/DSDT.bridge binary +0 -0
index cdfd51ce70d7201fa827bfabfd23e413596b1094..9f8a208aaadc167135e59839eefcd5b594c2f28a 100644
GIT binary patch
tests/data/acpi/q35/DSDT.core-count2 binary +0 -0
index 2bf77bb4e1a433eab66d0fdd175344d4f8d6e168..2ec11fe3c36d635080af05afa32852fcc1bf10be 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cphp binary +0 -0
index 1837442bd39f1249fb753530ea508d05e8d177f4..612c85b1b4c8e4cc642734b1d52f5d5e1e2ec4eb 100644
GIT binary patch
tests/data/acpi/q35/DSDT.cxl binary +0 -0
index 023da0665f9123943e23fd771725f4b8eb937135..ba6e174eee0210e829e4cc1cd6a0e12ba0678cff 100644
GIT binary patch
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
index 2ad9b1c30e9a583cc43e8efbc1e276b4f221ff28..23dabeacb06b3ad4360c1ca142c06a173f82ff51 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
index c552e668983198d077348a57a5b22065d01b40f1..541bb70522e72dd477f72cba2f71a336f6978de4 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
index 9fe6d1686a777ffddc2953420cd4838832226bad..e2d57a331873ada2fcbcdc1f0f7a244f235d7447 100644
GIT binary patch
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
index 7e43fa88c39737198427744ddb8d902edd517794..f26b1f2a19529c508d53ed3f434be0083c18dbab 100644
GIT binary patch
tests/data/acpi/q35/DSDT.memhp binary +0 -0
index a98ee8c7731c8aaf383e84fd48b90633e53ef240..809d7e2f0fc15351abc99031a118b4012822deea 100644
GIT binary patch
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
index 61e994d2651e15e232d9b5930bca32a33fd0b090..ab3fe3c1b56a35d1312779412978cc1d51f05d33 100644
GIT binary patch
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index 595ab64601ae3deb12bbf18ca463e39ba0a86195..4e4b5229502000550f169948393ba8cbc7a793d5 100644
GIT binary patch
tests/data/acpi/q35/DSDT.noacpihp binary +0 -0
index c292c2369b011b779af44d0fa6fd2f7994098b2e..1c17aa30f7f0155a81988aa43c56e2f71530b4e4 100644
GIT binary patch
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
index be3060aa51d67c0f02c70bd0a7d5c028016641a1..becb5f7cad68361463b30be80095ab10966d7c88 100644
GIT binary patch
tests/data/acpi/q35/DSDT.numamem binary +0 -0
index 5e94a2b61f840c68d27257831cf608d41ee7c154..0cdec0b4c53b2b0e38cd019caab552f66f7728e7 100644
GIT binary patch
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
index 0e609a0c48fef371f935f239ebb9620fa116b049..6a9904ec947e373520e0135a89c559cb4f57fa7d 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
index fc6cc4585a6b1d955bc80700ec2dc2720b7e4a89..628bf628f6891f906bf872f8916692ba0ccb6877 100644
GIT binary patch
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
index 815006e445d0ec44c2f4a7c8d30ead6616a32b32..35c6b08068d4d2fb0353802dc2460cc2912c129c 100644
GIT binary patch
tests/data/acpi/q35/DSDT.viot binary +0 -0
index a53b3135c85b0908a794f93c7f2e5d3720b79a7d..b4d8dfd96730c1bdc8e1110ada909ec1dcee6d30 100644
GIT binary patch
tests/data/acpi/q35/DSDT.xapic binary +0 -0
index 8cf5b9703d617d0a0b16d41cd713f7883c80fcfe..d4a34e23512c295f73abbe5ef1370fac7a1a06cd 100644
GIT binary patch
Signature · 1 line
2.39.1
#32 lore raw

PATCH 25/33 tests: acpi: whitelist DSDT before adding non-0 function device with acpi-index to testcases

In reply to Igor Mammedov
---
 tests/qtest/bios-tables-test-allowed-diff.h | 2 ++
 1 file changed, 2 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +2 -0
index dfb8523c8b..ad2b429de8 100644
@@ -1 +1,3 @@
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/q35/DSDT.multi-bridge",
+"tests/data/acpi/q35/DSDT.noacpihp",
Signature · 1 line
2.39.1
#33 lore raw

PATCH 26/33 tests: acpi: add non zero function device with acpi-index on non-hotpluggble bus

In reply to Igor Mammedov
---
 tests/qtest/bios-tables-test.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
tests/qtest/bios-tables-test.c +4 -2
index 88493abc40..259405724e 100644
@@ -1028,10 +1028,11 @@ static void test_acpi_q35_tcg_no_acpi_hotplug(void)
                                  "addr=7.0"
         " -device pci-testdev,bus=nohprp,acpi-index=501"
         " -device pcie-root-port,id=nohprpint,port=0x0,chassis=3,hotplug=off,"
-                                 "addr=8.0"
+                                 "multifunction=on,addr=8.0"
+        " -device pci-testdev,bus=nohprpint,acpi-index=601,addr=8.1"
         " -device pcie-root-port,id=hprp2,port=0x0,chassis=4,bus=nohprpint,"
                                  "addr=9.0"
-        " -device pci-testdev,bus=hprp2,acpi-index=601"
+        " -device pci-testdev,bus=hprp2,acpi-index=602"
         , &data);
     free_test_data(&data);
 }
@@ -1059,6 +1060,7 @@ static void test_acpi_q35_multif_bridge(void)
         " -device pcie-root-port,id=rphptgt2,port=0x0,chassis=6,addr=2.2"
         " -device pcie-root-port,id=rphptgt3,port=0x0,chassis=7,addr=2.3"
         " -device pci-testdev,bus=pcie.0,addr=2.4"
+        " -device pci-testdev,bus=pcie.0,addr=2.5,acpi-index=102"
         " -device pci-testdev,bus=pcie.0,addr=5.0"
         " -device pci-testdev,bus=pcie.0,addr=0xf.0,acpi-index=101"
         " -device pci-testdev,bus=rp0,addr=0.0"
Signature · 1 line
2.39.1
#34 lore raw

PATCH 27/33 tests: acpi: update expected blobs

In reply to Igor Mammedov

an extra devices at non-zero function address with static _DSM method get exposed, ex:

+ Device (S15)
+ {

  +                Name (_ADR, 0x00020005)  // _ADR: Address
  +                Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
  +                {

+ Local0 = Package (0x01)
+ {
+ 0x66
+ }
+ Return (EDSM (Arg0, Arg1, Arg2, Arg3, Local0))
+ }
+ }

---
 tests/qtest/bios-tables-test-allowed-diff.h |   2 --
 tests/data/acpi/q35/DSDT.multi-bridge       | Bin 12729 -> 12770 bytes
 tests/data/acpi/q35/DSDT.noacpihp           | Bin 8205 -> 8248 bytes
 3 files changed, 2 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -2
index ad2b429de8..dfb8523c8b 100644
@@ -1,3 +1 @@
 /* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/q35/DSDT.multi-bridge",
-"tests/data/acpi/q35/DSDT.noacpihp",
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
index 4e4b5229502000550f169948393ba8cbc7a793d5..9ae8ee0b41738bd8951b9449abcfc67c293fdce1 100644
GIT binary patch
tests/data/acpi/q35/DSDT.noacpihp binary +0 -0
index 1c17aa30f7f0155a81988aa43c56e2f71530b4e4..6ab1f0e52543fcb7f84a7fd1327fe5aa42010565 100644
GIT binary patch
Signature · 1 line
2.39.1
#35 lore raw

PATCH 28/33 pci: move acpi-index uniqueness check to generic PCI device code

In reply to Igor Mammedov

acpi-index is now working with non-hotpluggable buses (pci/q35 machine hostbridge), it can be used even if ACPI PCI hotplug is disabled and as result acpi-index uniqueness check will be omitted (since the check is done by ACPI PCI hotplug handler, which isn't wired when ACPI PCI hotplug is disabled).
Move check and related code to generic PCIDevice so it would be independent of ACPI PCI hotplug.

---
PS: this also one step closer to enabling acpi-index support for microvm and virt/arm machines.

---
 hw/acpi/pcihp.c | 56 ------------------------------------------------
 hw/pci/pci.c    | 57 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 56 deletions(-)
hw/acpi/pcihp.c +0 -56
index 5dc7377411..adf45e8443 100644
@@ -54,21 +54,6 @@ typedef struct AcpiPciHpFind {
     PCIBus *bus;
 } AcpiPciHpFind;
 
-static gint g_cmp_uint32(gconstpointer a, gconstpointer b, gpointer user_data)
-{
-    return a - b;
-}
-
-static GSequence *pci_acpi_index_list(void)
-{
-    static GSequence *used_acpi_index_list;
-
-    if (!used_acpi_index_list) {
-        used_acpi_index_list = g_sequence_new(NULL);
-    }
-    return used_acpi_index_list;
-}
-
 static int acpi_pcihp_get_bsel(PCIBus *bus)
 {
     Error *local_err = NULL;
@@ -300,8 +285,6 @@ void acpi_pcihp_reset(AcpiPciHpState *s, bool acpihp_root_off)
     acpi_pcihp_update(s);
 }
 
-#define ONBOARD_INDEX_MAX (16 * 1024 - 1)
-
 void acpi_pcihp_device_pre_plug_cb(HotplugHandler *hotplug_dev,
                                    DeviceState *dev, Error **errp)
 {
@@ -314,34 +297,6 @@ void acpi_pcihp_device_pre_plug_cb(HotplugHandler *hotplug_dev,
                    ACPI_PCIHP_PROP_BSEL "' set");
         return;
     }
-
-    /*
-     * capped by systemd (see: udev-builtin-net_id.c)
-     * as it's the only known user honor it to avoid users
-     * misconfigure QEMU and then wonder why acpi-index doesn't work
-     */
-    if (pdev->acpi_index > ONBOARD_INDEX_MAX) {
-        error_setg(errp, "acpi-index should be less or equal to %u",
-                   ONBOARD_INDEX_MAX);
-        return;
-    }
-
-    /*
-     * make sure that acpi-index is unique across all present PCI devices
-     */
-    if (pdev->acpi_index) {
-        GSequence *used_indexes = pci_acpi_index_list();
-
-        if (g_sequence_lookup(used_indexes, GINT_TO_POINTER(pdev->acpi_index),
-                              g_cmp_uint32, NULL)) {
-            error_setg(errp, "a PCI device with acpi-index = %" PRIu32
-                       " already exist", pdev->acpi_index);
-            return;
-        }
-        g_sequence_insert_sorted(used_indexes,
-                                 GINT_TO_POINTER(pdev->acpi_index),
-                                 g_cmp_uint32, NULL);
-    }
 }
 
 void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
@@ -401,17 +356,6 @@ void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
     trace_acpi_pci_unplug(PCI_SLOT(pdev->devfn),
                           acpi_pcihp_get_bsel(pci_get_bus(pdev)));
 
-    /*
-     * clean up acpi-index so it could reused by another device
-     */
-    if (pdev->acpi_index) {
-        GSequence *used_indexes = pci_acpi_index_list();
-
-        g_sequence_remove(g_sequence_lookup(used_indexes,
-                          GINT_TO_POINTER(pdev->acpi_index),
-                          g_cmp_uint32, NULL));
-    }
-
     qdev_unrealize(dev);
 }
 
hw/pci/pci.c +57 -0

81 lines not on this page · raw message

Signature · 1 line
2.39.1
#36 lore raw

PATCH 29/33 acpi: pci: drop BSEL usage when deciding that device isn't hotpluggable

In reply to Igor Mammedov

previous commit ("pci: fix 'hotplugglable' property behavior") fixed pcie root port's 'hotpluggable' property to behave consistently.

So we don't need a BSEL crutch anymore to see of device is not hotpluggable, drop it from 'generic' PCI slots description handling.

BSEL is still used to decide if hotplug part should be called but that will be moved out of generic code to hotplug one by followup patches.

---
 hw/i386/acpi-build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/acpi-build.c +1 -1
index 7b982b6072..6b51b7401d 100644
@@ -590,7 +590,7 @@ void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus)
 
         call_dev_aml_func(DEVICE(bus->devices[devfn]), dev);
         /* add _DSM if device has acpi-index set */
-        if (pdev->acpi_index && !bsel &&
+        if (pdev->acpi_index &&
             !object_property_get_bool(OBJECT(pdev), "hotpluggable",
                                       &error_abort)) {
             aml_append(dev, aml_pci_static_endpoint_dsm(pdev));
Signature · 1 line
2.39.1
#37 lore raw

PATCH 30/33 acpi: pci: move BSEL into build_append_pcihp_slots()

In reply to Igor Mammedov

Generic PCI enumeration code doesn't really need access to BSEL value, it is only used as means to decide if hotplug enumerator should be called.

Use stateless object_property_find() to do that, and move the rest of BSEL handling into build_append_pcihp_slots() where it belongs.

This cleans up generic code a bit from hotplug stuff and follow up patch will remove remaining call to build_append_pcihp_slots() from generic code, making it possible to use without ACPI PCI hotplug dependencies.

---
 hw/i386/acpi-build.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
hw/i386/acpi-build.c +6 -9
index 6b51b7401d..d068b0507e 100644
@@ -519,12 +519,14 @@ static bool is_devfn_ignored_hotplug(const int devfn, const PCIBus *bus)
     return false;
 }
 
-static void build_append_pcihp_slots(Aml *parent_scope, PCIBus *bus,
-                                     QObject *bsel)
+static void build_append_pcihp_slots(Aml *parent_scope, PCIBus *bus)
 {
     int devfn;
     Aml *dev, *notify_method = NULL, *method;
+    QObject *bsel = object_property_get_qobject(OBJECT(bus),
+                        ACPI_PCIHP_PROP_BSEL, NULL);
     uint64_t bsel_val = qnum_get_uint(qobject_to(QNum, bsel));
+    qobject_unref(bsel);
 
     aml_append(parent_scope, aml_name_decl("BSEL", aml_int(bsel_val)));
     notify_method = aml_method("DVNT", 2, AML_NOTSERIALIZED);
@@ -569,12 +571,9 @@ static void build_append_pcihp_slots(Aml *parent_scope, PCIBus *bus,
 
 void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus)
 {
-    QObject *bsel;
     int devfn;
     Aml *dev;
 
-    bsel = object_property_get_qobject(OBJECT(bus), ACPI_PCIHP_PROP_BSEL, NULL);
-
     for (devfn = 0; devfn < ARRAY_SIZE(bus->devices); devfn++) {
         /* ACPI spec: 1.0b: Table 6-2 _ADR Object Bus Types, PCI type */
         int adr = PCI_SLOT(devfn) << 16 | PCI_FUNC(devfn);
@@ -600,11 +599,9 @@ void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus)
         aml_append(parent_scope, dev);
     }
 
-    if (bsel) {
-        build_append_pcihp_slots(parent_scope, bus, bsel);
+    if (object_property_find(OBJECT(bus), ACPI_PCIHP_PROP_BSEL)) {
+        build_append_pcihp_slots(parent_scope, bus);
     }
-
-    qobject_unref(bsel);
 }
 
 static bool build_append_notfication_callback(Aml *parent_scope,
Signature · 1 line
2.39.1
#38 lore raw

PATCH 31/33 acpi: pci: move out ACPI PCI hotplug generator from generic slot generator build_append_pci_bus_devices()

In reply to Igor Mammedov
---
 include/hw/acpi/pcihp.h |  2 ++
 hw/acpi/pci-bridge.c    | 12 +++++++++++-
 hw/i386/acpi-build.c    |  9 ++++-----
 3 files changed, 17 insertions(+), 6 deletions(-)
include/hw/acpi/pcihp.h +2 -0
index 7e268c2c9c..cd18ebdcdc 100644
@@ -71,6 +71,8 @@ void acpi_pcihp_device_unplug_request_cb(HotplugHandler *hotplug_dev,
 /* Called on reset */
 void acpi_pcihp_reset(AcpiPciHpState *s, bool acpihp_root_off);
 
+void build_append_pcihp_slots(Aml *parent_scope, PCIBus *bus);
+
 extern const VMStateDescription vmstate_acpi_pcihp_pci_status;
 
 #define VMSTATE_PCI_HOTPLUG(pcihp, state, test_pcihp, test_acpi_index) \
hw/acpi/pci-bridge.c +11 -1
index 4fbf6da6ad..7baa7034a1 100644
@@ -22,6 +22,16 @@ void build_pci_bridge_aml(AcpiDevAmlIf *adev, Aml *scope)
     PCIBridge *br = PCI_BRIDGE(adev);
 
     if (!DEVICE(br)->hotplugged) {
-        build_append_pci_bus_devices(scope, pci_bridge_get_sec_bus(br));
+        PCIBus *sec_bus = pci_bridge_get_sec_bus(br);
+
+        build_append_pci_bus_devices(scope, sec_bus);
+
+        /*
+         * generate hotplug slots descriptors if
+         * bridge has ACPI PCI hotplug attached,
+         */
+        if (object_property_find(OBJECT(sec_bus), ACPI_PCIHP_PROP_BSEL)) {
+            build_append_pcihp_slots(scope, sec_bus);
+        }
     }
 }
hw/i386/acpi-build.c +4 -5
index d068b0507e..0c298b5f60 100644
@@ -519,7 +519,7 @@ static bool is_devfn_ignored_hotplug(const int devfn, const PCIBus *bus)
     return false;
 }
 
-static void build_append_pcihp_slots(Aml *parent_scope, PCIBus *bus)
+void build_append_pcihp_slots(Aml *parent_scope, PCIBus *bus)
 {
     int devfn;
     Aml *dev, *notify_method = NULL, *method;
@@ -598,10 +598,6 @@ void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus)
         /* device descriptor has been composed, add it into parent context */
         aml_append(parent_scope, dev);
     }
-
-    if (object_property_find(OBJECT(bus), ACPI_PCIHP_PROP_BSEL)) {
-        build_append_pcihp_slots(parent_scope, bus);
-    }
 }
 
 static bool build_append_notfication_callback(Aml *parent_scope,
@@ -1790,6 +1786,9 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
             Aml *scope = aml_scope("PCI0");
             /* Scan all PCI buses. Generate tables to support hotplug. */
             build_append_pci_bus_devices(scope, bus);
+            if (object_property_find(OBJECT(bus), ACPI_PCIHP_PROP_BSEL)) {
+                build_append_pcihp_slots(scope, bus);
+            }
             aml_append(sb_scope, scope);
         }
     }
Signature · 1 line
2.39.1
#39 lore raw

PATCH 32/33 pcihp: move fields enabling hotplug into AcpiPciHpState

In reply to Igor Mammedov

... instead of duplicating them in piix4 and lpc and then trying to pass them to pcihp routines as arguments. it simplifies call sites and places pcihp specific in its own structure.

---
 include/hw/acpi/pcihp.h         |  8 ++++----
 include/hw/acpi/piix4.h         |  2 --
 hw/acpi/acpi-pci-hotplug-stub.c |  5 ++---
 hw/acpi/ich9.c                  | 15 +++++++--------
 hw/acpi/pcihp.c                 | 16 ++++++++--------
 hw/acpi/piix4.c                 | 23 +++++++++++++----------
 6 files changed, 34 insertions(+), 35 deletions(-)
include/hw/acpi/pcihp.h +4 -4
index cd18ebdcdc..04c98511a4 100644
@@ -49,14 +49,14 @@ typedef struct AcpiPciHpState {
     uint32_t acpi_index;
     PCIBus *root;
     MemoryRegion io;
-    bool legacy_piix;
     uint16_t io_base;
     uint16_t io_len;
+    bool use_acpi_hotplug_bridge;
+    bool use_acpi_root_pci_hotplug;
 } AcpiPciHpState;
 
 void acpi_pcihp_init(Object *owner, AcpiPciHpState *, PCIBus *root,
-                     MemoryRegion *address_space_io, bool bridges_enabled,
-                     uint16_t io_base);
+                     MemoryRegion *address_space_io, uint16_t io_base);
 
 void acpi_pcihp_device_pre_plug_cb(HotplugHandler *hotplug_dev,
                                    DeviceState *dev, Error **errp);
@@ -69,7 +69,7 @@ void acpi_pcihp_device_unplug_request_cb(HotplugHandler *hotplug_dev,
                                          Error **errp);
 
 /* Called on reset */
-void acpi_pcihp_reset(AcpiPciHpState *s, bool acpihp_root_off);
+void acpi_pcihp_reset(AcpiPciHpState *s);
 
 void build_append_pcihp_slots(Aml *parent_scope, PCIBus *bus);
 
include/hw/acpi/piix4.h +0 -2
index be1f8ea80e..eb1c122d80 100644
@@ -57,8 +57,6 @@ struct PIIX4PMState {
     Notifier powerdown_notifier;
 
     AcpiPciHpState acpi_pci_hotplug;
-    bool use_acpi_hotplug_bridge;
-    bool use_acpi_root_pci_hotplug;
     bool not_migrate_acpi_index;
 
     uint8_t disable_s3;
hw/acpi/acpi-pci-hotplug-stub.c +2 -3
index a43f6dafc9..d1794399f7 100644
@@ -5,8 +5,7 @@
 const VMStateDescription vmstate_acpi_pcihp_pci_status;
 
 void acpi_pcihp_init(Object *owner, AcpiPciHpState *s, PCIBus *root_bus,
-                     MemoryRegion *address_space_io, bool bridges_enabled,
-                     uint16_t io_base)
+                     MemoryRegion *address_space_io, uint16_t io_base)
 {
     return;
 }
@@ -36,7 +35,7 @@ void acpi_pcihp_device_unplug_request_cb(HotplugHandler *hotplug_dev,
     return;
 }
 
-void acpi_pcihp_reset(AcpiPciHpState *s, bool acpihp_root_off)
+void acpi_pcihp_reset(AcpiPciHpState *s)
 {
     return;
 }
hw/acpi/ich9.c +7 -8
index a93c470e9d..34a58fc07c 100644
@@ -218,7 +218,7 @@ static bool vmstate_test_use_pcihp(void *opaque)
 {
     ICH9LPCPMRegs *s = opaque;
 
-    return s->use_acpi_hotplug_bridge;
+    return s->acpi_pci_hotplug.use_acpi_hotplug_bridge;
 }
 
 static const VMStateDescription vmstate_pcihp_state = {
@@ -277,8 +277,8 @@ static void pm_reset(void *opaque)
     }
     pm->smi_en_wmask = ~0;
 
-    if (pm->use_acpi_hotplug_bridge) {
-        acpi_pcihp_reset(&pm->acpi_pci_hotplug, true);
+    if (pm->acpi_pci_hotplug.use_acpi_hotplug_bridge) {
+        acpi_pcihp_reset(&pm->acpi_pci_hotplug);
     }
 
     acpi_update_sci(&pm->acpi_regs, pm->irq);
@@ -320,12 +320,11 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
         acpi_pm_tco_init(&pm->tco_regs, &pm->io);
     }
 
-    if (pm->use_acpi_hotplug_bridge) {
+    if (pm->acpi_pci_hotplug.use_acpi_hotplug_bridge) {
         acpi_pcihp_init(OBJECT(lpc_pci),
                         &pm->acpi_pci_hotplug,
                         pci_get_bus(lpc_pci),
                         pci_address_space_io(lpc_pci),
-                        true,
                         ACPI_PCIHP_ADDR_ICH9);
 
         qbus_set_hotplug_handler(BUS(pci_get_bus(lpc_pci)),
@@ -407,14 +406,14 @@ static bool ich9_pm_get_acpi_pci_hotplug(Object *obj, Error **errp)
 {
     ICH9LPCState *s = ICH9_LPC_DEVICE(obj);
 
-    return s->pm.use_acpi_hotplug_bridge;
+    return s->pm.acpi_pci_hotplug.use_acpi_hotplug_bridge;
 }
 
 static void ich9_pm_set_acpi_pci_hotplug(Object *obj, bool value, Error **errp)
 {
     ICH9LPCState *s = ICH9_LPC_DEVICE(obj);
 
-    s->pm.use_acpi_hotplug_bridge = value;
+    s->pm.acpi_pci_hotplug.use_acpi_hotplug_bridge = value;
 }
 
 static bool ich9_pm_get_keep_pci_slot_hpc(Object *obj, Error **errp)
@@ -439,7 +438,7 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm)
     pm->disable_s3 = 0;
     pm->disable_s4 = 0;
     pm->s4_val = 2;
-    pm->use_acpi_hotplug_bridge = true;
+    pm->acpi_pci_hotplug.use_acpi_hotplug_bridge = true;
     pm->keep_pci_slot_hpc = true;
     pm->enable_tco = true;
 
hw/acpi/pcihp.c +8 -8
index adf45e8443..34cad061a8 100644
@@ -276,12 +276,12 @@ static void acpi_pcihp_update(AcpiPciHpState *s)
     }
 }
 
-void acpi_pcihp_reset(AcpiPciHpState *s, bool acpihp_root_off)
+void acpi_pcihp_reset(AcpiPciHpState *s)
 {
-    if (acpihp_root_off) {
+    if (!s->use_acpi_root_pci_hotplug) {
         acpi_pcihp_disable_root_bus();
     }
-    acpi_set_pci_info(!s->legacy_piix);
+    acpi_set_pci_info(s->use_acpi_hotplug_bridge);
     acpi_pcihp_update(s);
 }
 
@@ -316,7 +316,7 @@ void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
          * Overwrite the default hotplug handler with the ACPI PCI one
          * for cold plugged bridges only.
          */
-        if (!s->legacy_piix &&
+        if (s->use_acpi_hotplug_bridge &&
             object_dynamic_cast(OBJECT(dev), TYPE_PCI_BRIDGE)) {
             PCIBus *sec = pci_bridge_get_sec_bus(PCI_BRIDGE(pdev));
 
@@ -398,7 +398,7 @@ static uint64_t pci_read(void *opaque, hwaddr addr, unsigned int size)
     switch (addr) {
     case PCI_UP_BASE:
         val = s->acpi_pcihp_pci_status[bsel].up;
-        if (!s->legacy_piix) {
+        if (s->use_acpi_hotplug_bridge) {
             s->acpi_pcihp_pci_status[bsel].up = 0;
         }
         trace_acpi_pci_up_read(val);
@@ -473,7 +473,8 @@ static void pci_write(void *opaque, hwaddr addr, uint64_t data,
         trace_acpi_pci_ej_write(addr, data);
         break;
     case PCI_SEL_BASE:
-        s->hotplug_select = s->legacy_piix ? ACPI_PCIHP_BSEL_DEFAULT : data;
+        s->hotplug_select = s->use_acpi_hotplug_bridge ? data :
+            ACPI_PCIHP_BSEL_DEFAULT;
         trace_acpi_pci_sel_write(addr, data);
     default:
         break;
@@ -491,14 +492,13 @@ static const MemoryRegionOps acpi_pcihp_io_ops = {
 };
 
 void acpi_pcihp_init(Object *owner, AcpiPciHpState *s, PCIBus *root_bus,
-                     MemoryRegion *address_space_io, bool bridges_enabled,
+                     MemoryRegion *address_space_io,
                      uint16_t io_base)
 {
     s->io_len = ACPI_PCIHP_SIZE;
     s->io_base = io_base;
 
     s->root = root_bus;
-    s->legacy_piix = !bridges_enabled;
 
     memory_region_init_io(&s->io, owner, &acpi_pcihp_io_ops, s,
                           "acpi-pci-hotplug", s->io_len);
hw/acpi/piix4.c +13 -10
index 8fc422829a..0a233fa95d 100644
@@ -170,14 +170,14 @@ static const VMStateDescription vmstate_pci_status = {
 static bool vmstate_test_use_acpi_hotplug_bridge(void *opaque, int version_id)
 {
     PIIX4PMState *s = opaque;
-    return s->use_acpi_hotplug_bridge;
+    return s->acpi_pci_hotplug.use_acpi_hotplug_bridge;
 }
 
 static bool vmstate_test_no_use_acpi_hotplug_bridge(void *opaque,
                                                     int version_id)
 {
     PIIX4PMState *s = opaque;
-    return !s->use_acpi_hotplug_bridge;
+    return !s->acpi_pci_hotplug.use_acpi_hotplug_bridge;
 }
 
 static bool vmstate_test_use_memhp(void *opaque)
@@ -234,7 +234,8 @@ static bool piix4_vmstate_need_smbus(void *opaque, int version_id)
 static bool vmstate_test_migrate_acpi_index(void *opaque, int version_id)
 {
     PIIX4PMState *s = PIIX4_PM(opaque);
-    return s->use_acpi_hotplug_bridge && !s->not_migrate_acpi_index;
+    return s->acpi_pci_hotplug.use_acpi_hotplug_bridge &&
+           !s->not_migrate_acpi_index;
 }
 
 /* qemu-kvm 1.2 uses version 3 but advertised as 2
@@ -303,8 +304,9 @@ static void piix4_pm_reset(DeviceState *dev)
     acpi_update_sci(&s->ar, s->irq);
 
     pm_io_space_update(s);
-    if (s->use_acpi_hotplug_bridge || s->use_acpi_root_pci_hotplug) {
-        acpi_pcihp_reset(&s->acpi_pci_hotplug, !s->use_acpi_root_pci_hotplug);
+    if (s->acpi_pci_hotplug.use_acpi_hotplug_bridge ||
+        s->acpi_pci_hotplug.use_acpi_root_pci_hotplug) {
+        acpi_pcihp_reset(&s->acpi_pci_hotplug);
     }
 }
 
@@ -487,7 +489,7 @@ static void piix4_pm_realize(PCIDevice *dev, Error **errp)
     qemu_add_machine_init_done_notifier(&s->machine_ready);
 
     if (xen_enabled()) {
-        s->use_acpi_hotplug_bridge = false;
+        s->acpi_pci_hotplug.use_acpi_hotplug_bridge = false;
     }
 
     piix4_acpi_system_hot_add_init(pci_address_space_io(dev),
@@ -560,9 +562,10 @@ static void piix4_acpi_system_hot_add_init(MemoryRegion *parent,
                           "acpi-gpe0", GPE_LEN);
     memory_region_add_subregion(parent, GPE_BASE, &s->io_gpe);
 
-    if (s->use_acpi_hotplug_bridge || s->use_acpi_root_pci_hotplug) {
+    if (s->acpi_pci_hotplug.use_acpi_hotplug_bridge ||
+        s->acpi_pci_hotplug.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);
+                        ACPI_PCIHP_ADDR_PIIX4);
         qbus_set_hotplug_handler(BUS(pci_get_bus(PCI_DEVICE(s))), OBJECT(s));
     }
 
@@ -602,9 +605,9 @@ static Property piix4_pm_properties[] = {
     DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_DISABLED, PIIX4PMState, disable_s4, 0),
     DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_VAL, PIIX4PMState, s4_val, 2),
     DEFINE_PROP_BOOL(ACPI_PM_PROP_ACPI_PCIHP_BRIDGE, PIIX4PMState,
-                     use_acpi_hotplug_bridge, true),
+                     acpi_pci_hotplug.use_acpi_hotplug_bridge, true),
     DEFINE_PROP_BOOL(ACPI_PM_PROP_ACPI_PCI_ROOTHP, PIIX4PMState,
-                     use_acpi_root_pci_hotplug, true),
+                     acpi_pci_hotplug.use_acpi_root_pci_hotplug, true),
     DEFINE_PROP_BOOL("memory-hotplug-support", PIIX4PMState,
                      acpi_memory_hotplug.is_enabled, true),
     DEFINE_PROP_BOOL("smm-compat", PIIX4PMState, smm_compat, false),
Signature · 1 line
2.39.1
#40 lore raw

PATCH 33/33 pcihp: add ACPI PCI hotplug specific is_hotpluggable_bus() callback

In reply to Igor Mammedov

Provide pcihp specific callback to check if bus is hotpluggable and consolidate its scattered hotplug criteria there. While at it clean up no longer needed
qbus_set_hotplug_handler(BUS(bus), NULL)
workarounds since callback makes qbus_is_hotpluggable() return correct answer even if hotplug_handler is set on bus.

PS:
see ("pci: fix 'hotplugglable' property behavior") for details why callback was introduced.

---
 include/hw/acpi/ich9.h          |  1 +
 include/hw/acpi/pcihp.h         |  1 +
 hw/acpi/acpi-pci-hotplug-stub.c |  4 ++++
 hw/acpi/ich9.c                  |  6 +++++
 hw/acpi/pcihp.c                 | 42 ++++++++++++++-------------------
 hw/acpi/piix4.c                 |  8 +++++++
 hw/isa/lpc_ich9.c               |  1 +
 7 files changed, 39 insertions(+), 24 deletions(-)
include/hw/acpi/ich9.h +1 -0
index d41866a229..d2f980359e 100644
@@ -89,6 +89,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev,
                                       DeviceState *dev, Error **errp);
 void ich9_pm_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
                               Error **errp);
+bool ich9_pm_is_hotpluggable_bus(HotplugHandler *hotplug_dev, BusState *bus);
 
 void ich9_pm_ospm_status(AcpiDeviceIf *adev, ACPIOSTInfoList ***list);
 #endif /* HW_ACPI_ICH9_H */
include/hw/acpi/pcihp.h +1 -0
index 04c98511a4..ef59810c17 100644
@@ -58,6 +58,7 @@ typedef struct AcpiPciHpState {
 void acpi_pcihp_init(Object *owner, AcpiPciHpState *, PCIBus *root,
                      MemoryRegion *address_space_io, uint16_t io_base);
 
+bool acpi_pcihp_is_hotpluggbale_bus(AcpiPciHpState *s, BusState *bus);
 void acpi_pcihp_device_pre_plug_cb(HotplugHandler *hotplug_dev,
                                    DeviceState *dev, Error **errp);
 void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
hw/acpi/acpi-pci-hotplug-stub.c +4 -0
index d1794399f7..dcee3ad7a1 100644
@@ -40,3 +40,7 @@ void acpi_pcihp_reset(AcpiPciHpState *s)
     return;
 }
 
+bool acpi_pcihp_is_hotpluggbale_bus(AcpiPciHpState *s, BusState *bus)
+{
+    return true;
+}
hw/acpi/ich9.c +6 -0
index 34a58fc07c..e625adbbab 100644
@@ -582,6 +582,12 @@ void ich9_pm_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
     }
 }
 
+bool ich9_pm_is_hotpluggable_bus(HotplugHandler *hotplug_dev, BusState *bus)
+{
+    ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev);
+    return acpi_pcihp_is_hotpluggbale_bus(&lpc->pm.acpi_pci_hotplug, bus);
+}
+
 void ich9_pm_ospm_status(AcpiDeviceIf *adev, ACPIOSTInfoList ***list)
 {
     ICH9LPCState *s = ICH9_LPC_DEVICE(adev);
hw/acpi/pcihp.c +18 -24

66 lines not on this page · raw message

hw/acpi/piix4.c +8 -0
index 0a233fa95d..63d2113b86 100644
@@ -404,6 +404,13 @@ static void piix4_device_unplug_cb(HotplugHandler *hotplug_dev,
     }
 }
 
+static bool piix4_is_hotpluggable_bus(HotplugHandler *hotplug_dev,
+                                      BusState *bus)
+{
+    PIIX4PMState *s = PIIX4_PM(hotplug_dev);
+    return acpi_pcihp_is_hotpluggbale_bus(&s->acpi_pci_hotplug, bus);
+}
+
 static void piix4_pm_machine_ready(Notifier *n, void *opaque)
 {
     PIIX4PMState *s = container_of(n, PIIX4PMState, machine_ready);
@@ -644,6 +651,7 @@ static void piix4_pm_class_init(ObjectClass *klass, void *data)
     hc->plug = piix4_device_plug_cb;
     hc->unplug_request = piix4_device_unplug_request_cb;
     hc->unplug = piix4_device_unplug_cb;
+    hc->is_hotpluggable_bus = piix4_is_hotpluggable_bus;
     adevc->ospm_status = piix4_ospm_status;
     adevc->send_event = piix4_send_gpe;
     adevc->madt_cpu = pc_madt_cpu_entry;
hw/isa/lpc_ich9.c +1 -0
index 1fba3c210c..0e09e6b02c 100644
@@ -865,6 +865,7 @@ static void ich9_lpc_class_init(ObjectClass *klass, void *data)
     hc->plug = ich9_pm_device_plug_cb;
     hc->unplug_request = ich9_pm_device_unplug_request_cb;
     hc->unplug = ich9_pm_device_unplug_cb;
+    hc->is_hotpluggable_bus = ich9_pm_is_hotpluggable_bus;
     adevc->ospm_status = ich9_pm_ospm_status;
     adevc->send_event = ich9_send_gpe;
     adevc->madt_cpu = pc_madt_cpu_entry;
Signature · 1 line
2.39.1
#41 lore raw
In reply to Igor Mammedov
Quoted 13 lines · Igor Mammedov

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

Quoted 8 lines

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

1-11/33: fixes for bugs or odd behavior
13-23/33: non-hotplug/multifunction acpi-index enabling 28-33/33: cleanups
all of that is peppered by extra acpi tests or extensions to existing ones

dropped because viot was wrong.
Pls rebase fix up and repost.

Apropos I still think we should split up DSDT to several SSDTs, in a way that multiple tests share some SSDTs. This way it will be more common than a change only affects one table and it's easier to merge things.

For example, how about moving CXL things to an SSDT?

Quoted 116 lines

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
CI: https://gitlab.com/imammedo/qemu/-/pipelines/787263630
it's red but only due to unrelated curl breakage in msys* targets, the rest is green

Igor Mammedov (33):
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 9578 -> 9687 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 -> 9486 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35615 -> 35724 bytes
 tests/qtest/bios-tables-test.c                |  50 ++++-
 52 files changed, 341 insertions(+), 172 deletions(-)
 create mode 100644 tests/data/acpi/q35/DSDT.noacpihp
Signature · 1 line
2.39.1
#42 lore raw
Quoted 27 lines · On Thu, 2 Mar 2023 05:59:16 -0500 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 13 lines · Igor Mammedov

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

Quoted 8 lines

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

1-11/33: fixes for bugs or odd behavior
13-23/33: non-hotplug/multifunction acpi-index enabling 28-33/33: cleanups
all of that is peppered by extra acpi tests or extensions to existing ones

dropped because viot was wrong.
Pls rebase fix up and repost.

Quoted 6 lines

Apropos I still think we should split up DSDT to several SSDTs, in a way that multiple tests share some SSDTs. This way it will be more common than a change only affects one table and it's easier to merge things.

For example, how about moving CXL things to an SSDT?

I'll take a look at that, though given CXL doesn't have that much in DSDT that is different from pxb-pcie (it is set to grow a bit, but just by one _DSM) and the code is currently mixed up, it may make more sense to pull out both CXL and PXB into a single SSDT.

I'm definitely keen on less churn in these files given it's not the easiest thing to sort out if you care carrying a lot of patches out of tree as we currently are for CXL.

Jonathan

Quoted 120 lines
Quoted 118 lines

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
CI: https://gitlab.com/imammedo/qemu/-/pipelines/787263630
it's red but only due to unrelated curl breakage in msys* targets, the rest is green

Igor Mammedov (33):
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 9578 -> 9687 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 -> 9486 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35615 -> 35724 bytes
 tests/qtest/bios-tables-test.c                |  50 ++++-
 52 files changed, 341 insertions(+), 172 deletions(-)
 create mode 100644 tests/data/acpi/q35/DSDT.noacpihp
Signature · 1 line
2.39.1  
#43 lore raw
In reply to Michael S. Tsirkin
Quoted 18 lines · On Thu, 2 Mar 2023 05:59:16 -0500 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 17 lines · Igor Mammedov

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

Quoted 7 lines
Quoted 4 lines

1-11/33: fixes for bugs or odd behavior
13-23/33: non-hotplug/multifunction acpi-index enabling 28-33/33: cleanups
all of that is peppered by extra acpi tests or extensions to existing ones

dropped because viot was wrong.
Pls rebase fix up and repost.

I'll rebase on top of your recent pull req with c471eb4f4044 commit reverted to get properly updated tables.
Partial table rebuilds are fragile anyways, should we make rebuild ignore checks the commit introduced?

PS:
Does the rest of the series look fine to you?

Quoted 127 lines

Apropos I still think we should split up DSDT to several SSDTs, in a way that multiple tests share some SSDTs. This way it will be more common than a change only affects one table and it's easier to merge things.

For example, how about moving CXL things to an SSDT?

Quoted 116 lines

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
CI: https://gitlab.com/imammedo/qemu/-/pipelines/787263630
it's red but only due to unrelated curl breakage in msys* targets, the rest is green

Igor Mammedov (33):
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 9578 -> 9687 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 -> 9486 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35615 -> 35724 bytes
 tests/qtest/bios-tables-test.c                |  50 ++++-
 52 files changed, 341 insertions(+), 172 deletions(-)
 create mode 100644 tests/data/acpi/q35/DSDT.noacpihp
Signature · 1 line
2.39.1  
#44 lore raw
Quoted 26 lines · Igor Mammedov
Quoted 23 lines · On Thu, 2 Mar 2023 05:59:16 -0500 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 21 lines · Igor Mammedov

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-11/33: fixes for bugs or odd behavior
13-23/33: non-hotplug/multifunction acpi-index enabling 28-33/33: cleanups
all of that is peppered by extra acpi tests or extensions to existing ones

Quoted 7 lines
Quoted 2 lines

dropped because viot was wrong.
Pls rebase fix up and repost.

I'll rebase on top of your recent pull req with c471eb4f4044 commit reverted to get properly updated tables.
Partial table rebuilds are fragile anyways, should we make rebuild ignore checks the commit introduced?

Not sure how you mean.

Quoted 2 lines

PS:
Does the rest of the series look fine to you?

It does, was going to merge.

Quoted 128 lines
Quoted 128 lines

Apropos I still think we should split up DSDT to several SSDTs, in a way that multiple tests share some SSDTs. This way it will be more common than a change only affects one table and it's easier to merge things.

For example, how about moving CXL things to an SSDT?

Quoted 116 lines

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
CI: https://gitlab.com/imammedo/qemu/-/pipelines/787263630
it's red but only due to unrelated curl breakage in msys* targets, the rest is green

Igor Mammedov (33):
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 9578 -> 9687 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 -> 9486 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35615 -> 35724 bytes
 tests/qtest/bios-tables-test.c                |  50 ++++-
 52 files changed, 341 insertions(+), 172 deletions(-)
 create mode 100644 tests/data/acpi/q35/DSDT.noacpihp
Signature · 1 line
2.39.1  
#45 lore raw
Quoted 30 lines · On Thu, 2 Mar 2023 18:21:28 -0500 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 29 lines · Igor Mammedov
Quoted 25 lines · On Thu, 2 Mar 2023 05:59:16 -0500 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 13 lines · Igor Mammedov

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

Quoted 8 lines

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

1-11/33: fixes for bugs or odd behavior
13-23/33: non-hotplug/multifunction acpi-index enabling 28-33/33: cleanups
all of that is peppered by extra acpi tests or extensions to existing ones

dropped because viot was wrong.
Pls rebase fix up and repost.

Quoted 6 lines
Quoted 4 lines

I'll rebase on top of your recent pull req with c471eb4f4044 commit reverted to get properly updated tables.
Partial table rebuilds are fragile anyways, should we make rebuild ignore checks the commit introduced?

Not sure how you mean.

I'm not sure either, but I ended up reverting offending commit as Fabiano suggested for now and rebasing on top your tree + revert.

Later on if we are to reintroduce selective testcases, we need to think about how to make tables rebuild force all tests regardless of it.

Quoted 135 lines
Quoted 3 lines

PS:
Does the rest of the series look fine to you?

It does, was going to merge.

Quoted 128 lines
Quoted 128 lines

Apropos I still think we should split up DSDT to several SSDTs, in a way that multiple tests share some SSDTs. This way it will be more common than a change only affects one table and it's easier to merge things.

For example, how about moving CXL things to an SSDT?

Quoted 116 lines

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
CI: https://gitlab.com/imammedo/qemu/-/pipelines/787263630
it's red but only due to unrelated curl breakage in msys* targets, the rest is green

Igor Mammedov (33):
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 9578 -> 9687 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 -> 9486 bytes
 tests/data/acpi/q35/DSDT.xapic                | Bin 35615 -> 35724 bytes
 tests/qtest/bios-tables-test.c                |  50 ++++-
 52 files changed, 341 insertions(+), 172 deletions(-)
 create mode 100644 tests/data/acpi/q35/DSDT.noacpihp
Signature · 1 line
2.39.1