acpi:pc/q35: minor PCI refactoring/cleanups
cover acpi:pc/q35: minor PCI refactoring/cleanups
Flushing out ACPI PCI cleanups that preceed conversion of DSDT PCI slots ennumeration to AcpiDevAmlIf interface. It's is mostly collection of patches thraet removes code duplication, we've accumulated around PCI relaterd AML in DSDT.
git:
https://gitlab.com/imammedo/qemu.git x86_pci_cleanups
Igor Mammedov (17):
tests: acpi: whitelist pc/q35 DSDT due to HPET AML move
acpi: x86: deduplicate HPET AML building
tests: acpi: update expected blobs after HPET move
tests: acpi: whitelist pc/q35 DSDT due to HPET AML move
acpi: x86: refactor PDSM method to reduce nesting
x86: acpi: _DSM: use Package to pass parameters
tests: acpi: update expected blobs
tests: acpi: whitelist pc/q35 DSDT before switching _DSM to use ASUN
x86: acpi: cleanup PCI device _DSM duplication
tests: acpi: update expected blobs
tests: acpi: whitelist pc/q35 DSDT before moving _ADR field
x86: pci: acpi: reorder Device's _ADR and _SUN fields
tests: acpi: update expected blobs
tests: acpi: whitelist pc/q35 DSDT before moving _ADR field
x86: pci: acpi: reorder Device's _DSM method
tests: acpi: update expected blobs
x86: pci: acpi: deduplate PCI slots creation
hw/i386/acpi-build.c | 302 ++++++++++++++------------ tests/data/acpi/pc/DSDT | Bin 5987 -> 6422 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 5954 -> 6382 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 7312 -> 7747 bytes tests/data/acpi/pc/DSDT.bridge | Bin 8653 -> 9496 bytes tests/data/acpi/pc/DSDT.cphp | Bin 6451 -> 6886 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 7641 -> 8076 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 5954 -> 6382 bytes tests/data/acpi/pc/DSDT.hpbrroot | Bin 3069 -> 3069 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6059 -> 6494 bytes tests/data/acpi/pc/DSDT.memhp | Bin 7346 -> 7781 bytes tests/data/acpi/pc/DSDT.nohpet | Bin 5845 -> 6280 bytes tests/data/acpi/pc/DSDT.numamem | Bin 5993 -> 6428 bytes tests/data/acpi/pc/DSDT.roothp | Bin 6195 -> 6656 bytes tests/data/acpi/q35/DSDT | Bin 8274 -> 8320 bytes tests/data/acpi/q35/DSDT.acpierst | Bin 8291 -> 8337 bytes tests/data/acpi/q35/DSDT.acpihmat | Bin 9599 -> 9645 bytes tests/data/acpi/q35/DSDT.applesmc | Bin 8320 -> 8366 bytes tests/data/acpi/q35/DSDT.bridge | Bin 10988 -> 11449 bytes tests/data/acpi/q35/DSDT.cphp | Bin 8738 -> 8784 bytes tests/data/acpi/q35/DSDT.cxl | Bin 9600 -> 9646 bytes tests/data/acpi/q35/DSDT.dimmpxm | Bin 9928 -> 9974 bytes tests/data/acpi/q35/DSDT.ipmibt | Bin 8349 -> 8395 bytes tests/data/acpi/q35/DSDT.ipmismbus | Bin 8363 -> 8409 bytes tests/data/acpi/q35/DSDT.ivrs | Bin 8291 -> 8337 bytes tests/data/acpi/q35/DSDT.memhp | Bin 9633 -> 9679 bytes tests/data/acpi/q35/DSDT.mmio64 | Bin 9404 -> 9450 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 8568 -> 8640 bytes tests/data/acpi/q35/DSDT.nohpet | Bin 8132 -> 8178 bytes tests/data/acpi/q35/DSDT.numamem | Bin 8280 -> 8326 bytes tests/data/acpi/q35/DSDT.pvpanic-isa | Bin 8375 -> 8421 bytes tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8880 -> 8926 bytes tests/data/acpi/q35/DSDT.tis.tpm2 | Bin 8906 -> 8952 bytes tests/data/acpi/q35/DSDT.viot | Bin 9383 -> 9429 bytes tests/data/acpi/q35/DSDT.xapic | Bin 35637 -> 35683 bytes 35 files changed, 161 insertions(+), 141 deletions(-)
Signature · 1 line
2.31.1
PATCH 1/17 tests: acpi: whitelist pc/q35 DSDT due to HPET AML move
--- tests/qtest/bios-tables-test-allowed-diff.h | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +32 -0
@@ -1 +1,33 @@/* 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.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.applesmc" , +"tests/data/acpi/q35/DSDT.bridge" , +"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.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.31.1
PATCH 2/17 acpi: x86: deduplicate HPET AML building
In reply to Igor MammedovHPET AML doesn't depend on piix4 nor q35, move code buiding it to common scope to avoid duplication.
--- hw/i386/acpi-build.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
hw/i386/acpi-build.c +4 -6
@@ -1467,9 +1467,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,aml_append (sb_scope, dev);aml_append (dsdt, sb_scope); -if (misc->has_hpet) { -build_hpet_aml (dsdt); - }build_piix4_isa_bridge (dsdt);if (pm->pcihp_bridge_en || pm->pcihp_root_en) {build_x86_acpi_pci_hotplug (dsdt, pm->pcihp_io_base);
@@ -1515,9 +1512,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,aml_append (dsdt, sb_scope); -if (misc->has_hpet) { -build_hpet_aml (dsdt); - }build_q35_isa_bridge (dsdt);if (pm->pcihp_bridge_en) {build_x86_acpi_pci_hotplug (dsdt, pm->pcihp_io_base);
@@ -1528,6 +1522,10 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, } } +if (misc->has_hpet) { +build_hpet_aml (dsdt); + } +if (vmbus_bridge) { sb_scope =aml_scope ("_SB" );aml_append (sb_scope,build_vmbus_device_aml (vmbus_bridge));
Signature · 1 line
2.31.1
Re: [PATCH 02/17] acpi: x86: deduplicate HPET AML building
Quoted 4 lines · Igor Mammedov
HPET AML doesn't depend on piix4 nor q35, move code buiding it to common scope to avoid duplication.
Signed-off-by Igor Mammedov <[email protected]>
Apropos, tests/data/acpi/rebuild-expected-aml.sh ignores the fact that some tables might be identical. Also, there's no way to reuse expected files between machines. And so we have:
[qemu]$ find tests/data/acpi -type f -exec sha256sum '{}' ';'|sort
01fefc161dcd26564d86826df5c000b080a3442912165a1432dddd3fe9d1b78a tests/data/acpi/virt/APIC 01fefc161dcd26564d86826df5c000b080a3442912165a1432dddd3fe9d1b78a tests/data/acpi/virt/APIC.memhp 01fefc161dcd26564d86826df5c000b080a3442912165a1432dddd3fe9d1b78a tests/data/acpi/virt/APIC.numamem 034be54fda2de6c07e7568b0c2ed6e0a0936c235f1a4ae42dbad0771b8b451db tests/data/acpi/pc/NFIT.dimmpxm 034be54fda2de6c07e7568b0c2ed6e0a0936c235f1a4ae42dbad0771b8b451db tests/data/acpi/q35/NFIT.dimmpxm 0ecccad48c22fc54f86756ef5e9dbf5360544bcd50970e277a13422c5831b67c tests/data/acpi/q35/DSDT.memhp 10341f3d4e6822e578f0759e9c2cdf3ed24267e5a427cb2a31b63a028e208147 tests/data/acpi/virt/FACP 10341f3d4e6822e578f0759e9c2cdf3ed24267e5a427cb2a31b63a028e208147 tests/data/acpi/virt/FACP.memhp 10341f3d4e6822e578f0759e9c2cdf3ed24267e5a427cb2a31b63a028e208147 tests/data/acpi/virt/FACP.numamem 1a93fe13736fb8d51277ab086f7d7a3bbc6bcf946c68229c785ba8257ec8d865 tests/data/acpi/pc/SRAT.memhp 1a93fe13736fb8d51277ab086f7d7a3bbc6bcf946c68229c785ba8257ec8d865 tests/data/acpi/q35/SRAT.memhp 3f0fe229cae8032140af80d8e84105e1b3cc2307b5daa60548d0a00c3b5c0649 tests/data/acpi/pc/SLIT.cphp 3f0fe229cae8032140af80d8e84105e1b3cc2307b5daa60548d0a00c3b5c0649 tests/data/acpi/pc/SLIT.memhp 3f0fe229cae8032140af80d8e84105e1b3cc2307b5daa60548d0a00c3b5c0649 tests/data/acpi/q35/SLIT.cphp 3f0fe229cae8032140af80d8e84105e1b3cc2307b5daa60548d0a00c3b5c0649 tests/data/acpi/q35/SLIT.memhp 3f0fe229cae8032140af80d8e84105e1b3cc2307b5daa60548d0a00c3b5c0649 tests/data/acpi/virt/SLIT.memhp 3fb3115e2c3c626603dbb20ab49825295d952f171ed7901a7f464cead2f40800 tests/data/acpi/pc/FACS 3fb3115e2c3c626603dbb20ab49825295d952f171ed7901a7f464cead2f40800 tests/data/acpi/q35/FACS 43b225e2dc8f37c4a7d5af6452187097a4417b0aaa102a5a7000c4ba683946cb tests/data/acpi/virt/SPCR 43b225e2dc8f37c4a7d5af6452187097a4417b0aaa102a5a7000c4ba683946cb tests/data/acpi/virt/SPCR.memhp 43b225e2dc8f37c4a7d5af6452187097a4417b0aaa102a5a7000c4ba683946cb tests/data/acpi/virt/SPCR.numamem 48831ff36e0e0c1916a0a637854a44f861aee551fff75d486da31605caebd16f tests/data/acpi/rebuild-expected-aml.sh 498a52d92d615ba2c5c69d62296f4f21792543c8d52ccb9fade1c69cfd83fae8 tests/data/acpi/pc/APIC.cphp 498a52d92d615ba2c5c69d62296f4f21792543c8d52ccb9fade1c69cfd83fae8 tests/data/acpi/q35/APIC.cphp 49906fead65caf8e2b093dc193ec082772c7559a9a8fe2d20914bc44dc811716 tests/data/acpi/q35/DSDT.dimmpxm 5307211b50c65c8c05e4efb81b1d320e9208b5d3aac5a3d6bd37b9f47ef3bc4c tests/data/acpi/pc/DSDT.ipmikcs 532089625245db3aeb4bf3a88c13d054be1fb21a24599b9d1bc17832a416937a tests/data/acpi/pc/DSDT 5d3803c3e90296d0a4ea3b9501b0af926196f7288b1ff9160c5294141113e396 tests/data/acpi/q35/DSDT.numamem 5e4c0a107998d58be1ff10ffa08bff225f7f6efe3027095135d2e55bc15512fe tests/data/acpi/pc/DSDT.cphp 61402328e4de16de4b7409564225268ae522ad913d9ef92276611ef22d9013a0 tests/data/acpi/virt/SRAT.numamem 645efebd748df15bd2cf7f0186cc7aeaaf8b40ac4adea29d871ac323360fc82c tests/data/acpi/q35/FACP 6608617b0a5df135a12a3866e4e4239fbe77e3004ff4d6ea42f16879e69cf10f tests/data/acpi/pc/DSDT.dimmpxm 6bc5f8fb421eff6f00de89743a56a88c951f47180b5ad83ceaad69aaf9fad984 tests/data/acpi/q35/DSDT.ipmibt 73d031ef66864988d9be337684317128c2e45c75a2af4fc35f20d216d83a2efd tests/data/acpi/virt/DSDT 73d031ef66864988d9be337684317128c2e45c75a2af4fc35f20d216d83a2efd tests/data/acpi/virt/DSDT.numamem 79fd95d6904b66b0a99982c64a0d54ea75bfa0568e8f02e1dcd9cdca404a758f tests/data/acpi/pc/APIC 79fd95d6904b66b0a99982c64a0d54ea75bfa0568e8f02e1dcd9cdca404a758f tests/data/acpi/q35/APIC 836514ed3adca20b1085838a37688dc1427811b648a7cc4e2a0a0f2d0cc6c99f tests/data/acpi/pc/DSDT.numamem 84d4fd8e55b1785e8c22d1ea17a542266ca14af0c747115316cc7201df338e03 tests/data/acpi/q35/MCFG 879dd52ff293ddbc4d1f589482f882619b99816c4e362f19dab099d1a0e42da9 tests/data/acpi/pc/SRAT.numamem 879dd52ff293ddbc4d1f589482f882619b99816c4e362f19dab099d1a0e42da9 tests/data/acpi/q35/SRAT.numamem 87ec0a685c6bcb1e33af3e558431f038ecd33e4243dd68a4b14d4e97c3d5fb6d tests/data/acpi/q35/SSDT.dimmpxm 8b28d0ce160bf42a812871210141f5d509932682a959b579c0d4f8f43b03fb42 tests/data/acpi/virt/SRAT.memhp 90a603d2f099cc3e3c9bd9de2f8f1cdad5307a6d2f6d2e7951f5418c7f422908 tests/data/acpi/q35/DSDT.cphp 95d9002674201957e58be516daf29729c2ac8e926bfb7256c1bc56fb8dc6eb01 tests/data/acpi/virt/MCFG 95d9002674201957e58be516daf29729c2ac8e926bfb7256c1bc56fb8dc6eb01 tests/data/acpi/virt/MCFG.memhp 95d9002674201957e58be516daf29729c2ac8e926bfb7256c1bc56fb8dc6eb01 tests/data/acpi/virt/MCFG.numamem 9aa0f3568a9f1c25d4c12257831974af88236bcc4b21b90df78ebe95bbb97475 tests/data/acpi/pc/HPET 9aa0f3568a9f1c25d4c12257831974af88236bcc4b21b90df78ebe95bbb97475 tests/data/acpi/q35/HPET ac64d624eb666028565f4d508a80ae04ed7b48232c60c320de1beba4999ecb69 tests/data/acpi/virt/DSDT.memhp b65c1b10bc565814f0c0950abd40712fd098b88c88f37f9bb20355356dd2b04f tests/data/acpi/pc/DSDT.bridge bb1c9e9e87bf9c1f8c96eb1deb201abb8a177296f1daa4dd53a9450c94307b7f tests/data/acpi/pc/SRAT.cphp bb1c9e9e87bf9c1f8c96eb1deb201abb8a177296f1daa4dd53a9450c94307b7f tests/data/acpi/q35/SRAT.cphp c9864027de5fed8169f5a283f64f15b799f34d26f66e3f4131da5c5ce1ec6d5d tests/data/acpi/q35/DSDT ca48a8cf471fcdde73f0997700cb99a39e738257eb26b5509dfb81005a694b83 tests/data/acpi/pc/SSDT.dimmpxm ddfb6d6b50dd4645efac8358d86c7d2f310cbf0300823b68ef0d996e31f01c44 tests/data/acpi/virt/GTDT ddfb6d6b50dd4645efac8358d86c7d2f310cbf0300823b68ef0d996e31f01c44 tests/data/acpi/virt/GTDT.memhp ddfb6d6b50dd4645efac8358d86c7d2f310cbf0300823b68ef0d996e31f01c44 tests/data/acpi/virt/GTDT.numamem e641d8505ab15bfd7ec399431eb3cb709cf0e06e15c528cc7d5da389392c89da tests/data/acpi/q35/SRAT.mmio64 e7274a622cf4be3d991a8cedf4437c1976334a1332fac78aaeaa47a94d6e2697 tests/data/acpi/pc/DSDT.memhp e93a393836970c4f32fff86a1931b8e45ee4634e5c99168491f2c55823647fda tests/data/acpi/pc/APIC.dimmpxm e93a393836970c4f32fff86a1931b8e45ee4634e5c99168491f2c55823647fda tests/data/acpi/q35/APIC.dimmpxm ee7b4e121c41519501119b4b7bd52edcf1124fcf271b7dd3086f0038b182b947 tests/data/acpi/q35/DSDT.bridge f089eb8441987367f223fa5e5e9fec8c12d9557cf0c6d68d0e8372be4c39fa7c tests/data/acpi/pc/FACP fabfa7d0ed2367bf1499b1a1d0b7253cd08a298e2aa0be3ca8f0dae5150e71a9 tests/data/acpi/q35/DSDT.mmio64 fb7675409f2264b14e5859e9187e7d05811bcc0570444b18cded8ff49a3514c5 tests/data/acpi/pc/SRAT.dimmpxm fb7675409f2264b14e5859e9187e7d05811bcc0570444b18cded8ff49a3514c5 tests/data/acpi/q35/SRAT.dimmpxm
It's easy to fix up duplications within virt. But I am not 100% sure how fix up duplication between q35 and pc. I think we should really fix qemu to allow pc-i440fx and pc-q35 as machine types. Right now:
microvm microvm (i386) xenfv-4.2 Xen Fully-virtualized PC xenfv Xen Fully-virtualized PC (alias of xenfv-3.1) xenfv-3.1 Xen Fully-virtualized PC pc Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-7.1) pc-i440fx-7.1 Standard PC (i440FX + PIIX, 1996) (default) pc-i440fx-7.0 Standard PC (i440FX + PIIX, 1996) pc-i440fx-6.2 Standard PC (i440FX + PIIX, 1996) pc-i440fx-6.1 Standard PC (i440FX + PIIX, 1996) pc-i440fx-6.0 Standard PC (i440FX + PIIX, 1996) pc-i440fx-5.2 Standard PC (i440FX + PIIX, 1996) pc-i440fx-5.1 Standard PC (i440FX + PIIX, 1996) pc-i440fx-5.0 Standard PC (i440FX + PIIX, 1996) pc-i440fx-4.2 Standard PC (i440FX + PIIX, 1996) pc-i440fx-4.1 Standard PC (i440FX + PIIX, 1996) pc-i440fx-4.0 Standard PC (i440FX + PIIX, 1996) pc-i440fx-3.1 Standard PC (i440FX + PIIX, 1996) pc-i440fx-3.0 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.9 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.8 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.7 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.6 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.5 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.4 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.3 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.2 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.12 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.11 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.10 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.1 Standard PC (i440FX + PIIX, 1996) pc-i440fx-2.0 Standard PC (i440FX + PIIX, 1996) pc-i440fx-1.7 Standard PC (i440FX + PIIX, 1996) (deprecated) pc-i440fx-1.6 Standard PC (i440FX + PIIX, 1996) (deprecated) pc-i440fx-1.5 Standard PC (i440FX + PIIX, 1996) (deprecated) pc-i440fx-1.4 Standard PC (i440FX + PIIX, 1996) (deprecated) q35 Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-7.1) pc-q35-7.1 Standard PC (Q35 + ICH9, 2009) pc-q35-7.0 Standard PC (Q35 + ICH9, 2009) pc-q35-6.2 Standard PC (Q35 + ICH9, 2009) pc-q35-6.1 Standard PC (Q35 + ICH9, 2009) pc-q35-6.0 Standard PC (Q35 + ICH9, 2009) pc-q35-5.2 Standard PC (Q35 + ICH9, 2009) pc-q35-5.1 Standard PC (Q35 + ICH9, 2009) pc-q35-5.0 Standard PC (Q35 + ICH9, 2009) pc-q35-4.2 Standard PC (Q35 + ICH9, 2009) pc-q35-4.1 Standard PC (Q35 + ICH9, 2009) pc-q35-4.0.1 Standard PC (Q35 + ICH9, 2009) pc-q35-4.0 Standard PC (Q35 + ICH9, 2009) pc-q35-3.1 Standard PC (Q35 + ICH9, 2009) pc-q35-3.0 Standard PC (Q35 + ICH9, 2009) pc-q35-2.9 Standard PC (Q35 + ICH9, 2009) pc-q35-2.8 Standard PC (Q35 + ICH9, 2009) pc-q35-2.7 Standard PC (Q35 + ICH9, 2009) pc-q35-2.6 Standard PC (Q35 + ICH9, 2009) pc-q35-2.5 Standard PC (Q35 + ICH9, 2009) pc-q35-2.4 Standard PC (Q35 + ICH9, 2009) pc-q35-2.12 Standard PC (Q35 + ICH9, 2009) pc-q35-2.11 Standard PC (Q35 + ICH9, 2009) pc-q35-2.10 Standard PC (Q35 + ICH9, 2009) isapc ISA-only PC none empty machine x-remote Experimental remote machine xenpv Xen Para-virtualized PC
which IMHO is a bit of a mess.
Then we could maybe use the directory "pc" for files common to i440fx and q35. Maybe just teach the test to look under tests/data/acpi/x86 too? And I think we should teach tests/data/acpi/rebuild-expected-aml.sh to check for duplicates and at least warn the user.
Signature · 1 line
MST
Re: [PATCH 02/17] acpi: x86: deduplicate HPET AML building
Quoted 12 lines · On Fri, 1 Jul 2022 12:26:16 -0400 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 4 lines · Igor Mammedov
HPET AML doesn't depend on piix4 nor q35, move code buiding it to common scope to avoid duplication.
Signed-off-by Igor Mammedov <[email protected]>Apropos,
tests/data/acpi/rebuild-expected-aml.shignores the fact that some tables might be identical. Also, there's no way to reuse expected files between machines. And so we have:[qemu]$ find tests/data/acpi -type f -exec sha256sum '{}' ';'|sort
[...]
Quoted 4 lines
It's easy to fix up duplications within virt. But I am not 100% sure how fix up duplication between q35 and pc.
[...]
Quoted 4 lines
Then we could maybe use the directory "pc" for files common to i440fx and q35. Maybe just teach the test to look under tests/data/acpi/x86 too? And I think we should teach
tests/data/acpi/rebuild-expected-aml.shto check for duplicates and at least warn the user.
Probably duplicates in 'virt' mostly due to combination of not knowing that there is a fallback lookup (which is hidden in the code) and simplistic way tests/data/acpi/rebuild-expected-aml.sh rebuilds tables.
As you suggest, rebuild-expected-aml.sh can be improved to warn or even better drop duplicates if found.
As for reusing tables between different machine types, alternatively we can add explicit remapping rules (possibly auto-generated) versus currently used implicit fallback approach.
Re: [PATCH 02/17] acpi: x86: deduplicate HPET AML building
Quoted 28 lines · Igor Mammedov
Quoted 12 lines · On Fri, 1 Jul 2022 12:26:16 -0400 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 4 lines · Igor Mammedov
HPET AML doesn't depend on piix4 nor q35, move code buiding it to common scope to avoid duplication.
Signed-off-by Igor Mammedov <[email protected]>Apropos,
tests/data/acpi/rebuild-expected-aml.shignores the fact that some tables might be identical. Also, there's no way to reuse expected files between machines. And so we have:[qemu]$ find tests/data/acpi -type f -exec sha256sum '{}' ';'|sort
[...]
Quoted 4 lines
It's easy to fix up duplications within virt. But I am not 100% sure how fix up duplication between q35 and pc.
[...]
Quoted 4 lines
Then we could maybe use the directory "pc" for files common to i440fx and q35. Maybe just teach the test to look under tests/data/acpi/x86 too? And I think we should teach
tests/data/acpi/rebuild-expected-aml.shto check for duplicates and at least warn the user.
Quoted 6 lines
Probably duplicates in 'virt' mostly due to combination of not knowing that there is a fallback lookup (which is hidden in the code) and simplistic way
tests/data/acpi/rebuild-expected-aml.shrebuilds tables.As you suggest,
rebuild-expected-aml.shcan be improved to warn or even better drop duplicates if found.
Want to try?
Quoted 3 lines
As for reusing tables between different machine types, alternatively we can add explicit remapping rules (possibly auto-generated) versus currently used implicit fallback approach.
My worry with this is that if a specific table needs to be split from the generic variant then user would have to hack the test code as opposed to just updating the tables, so the update can not be done automatically. Thoughts?
Signature · 1 line
MST
Re: [PATCH 02/17] acpi: x86: deduplicate HPET AML building
Quoted 29 lines · On Thu, 7 Jul 2022 06:08:35 -0400 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 28 lines · Igor Mammedov
Quoted 12 lines · On Fri, 1 Jul 2022 12:26:16 -0400 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 4 lines · Igor Mammedov
HPET AML doesn't depend on piix4 nor q35, move code buiding it to common scope to avoid duplication.
Signed-off-by Igor Mammedov <[email protected]>Apropos,
tests/data/acpi/rebuild-expected-aml.shignores the fact that some tables might be identical. Also, there's no way to reuse expected files between machines. And so we have:[qemu]$ find tests/data/acpi -type f -exec sha256sum '{}' ';'|sort
[...]
Quoted 4 lines
It's easy to fix up duplications within virt. But I am not 100% sure how fix up duplication between q35 and pc.
[...]
Quoted 4 lines
Then we could maybe use the directory "pc" for files common to i440fx and q35. Maybe just teach the test to look under tests/data/acpi/x86 too? And I think we should teach
tests/data/acpi/rebuild-expected-aml.shto check for duplicates and at least warn the user.
Quoted 8 lines
Quoted 6 lines
Probably duplicates in 'virt' mostly due to combination of not knowing that there is a fallback lookup (which is hidden in the code) and simplistic way
tests/data/acpi/rebuild-expected-aml.shrebuilds tables.As you suggest,
rebuild-expected-aml.shcan be improved to warn or even better drop duplicates if found.Want to try?
I'll put it on my queue, after PCI refactorings
Quoted 9 lines
Quoted 4 lines
As for reusing tables between different machine types, alternatively we can add explicit remapping rules (possibly auto-generated) versus currently used implicit fallback approach.
My worry with this is that if a specific table needs to be split from the generic variant then user would have to hack the test code as opposed to just updating the tables, so the update can not be done automatically. Thoughts?
I'll try to implement it and see if it's possible.
PATCH 3/17 tests: acpi: update expected blobs after HPET move
In reply to Igor MammedovHPET AML moved after PCI host bridge description (no functional change)
diff example for PC machine:
@@ -54,47 +54,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001)
}
}- Scope (_SB)
- {
- Device (HPET)
- {
- Name (_HID, EisaId ("PNP0103") /* HPET System Timer */) // _HID: Hardware ID
- Name (_UID, Zero) // _UID: Unique ID
- OperationRegion (HPTM, SystemMemory, 0xFED00000, 0x0400)
- Field (HPTM, DWordAcc, Lock, Preserve)
- {
- VEND, 32,
- PRD, 32- }
-
- Method (_STA, 0, NotSerialized) // _STA: Status
- {
- Local0 = VEND /* \_SB_.HPET.VEND */
- Local1 = PRD /* \_SB_.HPET.PRD_ */
- Local0 >>= 0x10
- If (((Local0 == Zero) || (Local0 == 0xFFFF)))
- {- Return (Zero)
- }
-
- If (((Local1 == Zero) || (Local1 > 0x05F5E100)))
- {
- Return (Zero)
- }
-
- Return (0x0F)
- }
-
- Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
- {
- Memory32Fixed (ReadOnly,
- 0xFED00000, // Address Base - 0x00000400, // Address Length - )
- })
- }
- }
-
Scope (_SB.PCI0)
{
Device (ISA)
@@ -529,6 +488,47 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001)
}
}+ Scope (_SB)
+ {
+ Device (HPET)
+ {
+ Name (_HID, EisaId ("PNP0103") /* HPET System Timer */) // _HID: Hardware ID
+ Name (_UID, Zero) // _UID: Unique ID
+ OperationRegion (HPTM, SystemMemory, 0xFED00000, 0x0400)
+ Field (HPTM, DWordAcc, Lock, Preserve)
+ {
+ VEND, 32,
+ PRD, 32+ }
+
+ Method (_STA, 0, NotSerialized) // _STA: Status
+ {
+ Local0 = VEND /* \_SB_.HPET.VEND */
+ Local1 = PRD /* \_SB_.HPET.PRD_ */
+ Local0 >>= 0x10
+ If (((Local0 == Zero) || (Local0 == 0xFFFF)))
+ {+ Return (Zero)
+ }
+
+ If (((Local1 == Zero) || (Local1 > 0x05F5E100)))
+ {
+ Return (Zero)
+ }
+
+ Return (0x0F)
+ }
+
+ Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
+ {
+ Memory32Fixed (ReadOnly,
+ 0xFED00000, // Address Base + 0x00000400, // Address Length + )
+ })
+ }
+ }
+
Scope (_SB)
{
Device (\_SB.PCI0.PRES)--- tests/qtest/bios-tables-test-allowed-diff.h | 32 -------------------- tests/data/acpi/pc/DSDT | Bin 5987 -> 5987 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 5954 -> 5954 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 7312 -> 7312 bytes tests/data/acpi/pc/DSDT.bridge | Bin 8653 -> 8653 bytes tests/data/acpi/pc/DSDT.cphp | Bin 6451 -> 6451 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 7641 -> 7641 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 5954 -> 5954 bytes tests/data/acpi/pc/DSDT.hpbrroot | Bin 3069 -> 3069 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6059 -> 6059 bytes tests/data/acpi/pc/DSDT.memhp | Bin 7346 -> 7346 bytes tests/data/acpi/pc/DSDT.numamem | Bin 5993 -> 5993 bytes tests/data/acpi/pc/DSDT.roothp | Bin 6195 -> 6195 bytes tests/data/acpi/q35/DSDT | Bin 8274 -> 8274 bytes tests/data/acpi/q35/DSDT.acpierst | Bin 8291 -> 8291 bytes tests/data/acpi/q35/DSDT.acpihmat | Bin 9599 -> 9599 bytes tests/data/acpi/q35/DSDT.applesmc | Bin 8320 -> 8320 bytes tests/data/acpi/q35/DSDT.bridge | Bin 10988 -> 10988 bytes tests/data/acpi/q35/DSDT.cphp | Bin 8738 -> 8738 bytes tests/data/acpi/q35/DSDT.cxl | Bin 9600 -> 9600 bytes tests/data/acpi/q35/DSDT.dimmpxm | Bin 9928 -> 9928 bytes tests/data/acpi/q35/DSDT.ipmibt | Bin 8349 -> 8349 bytes tests/data/acpi/q35/DSDT.ipmismbus | Bin 8363 -> 8363 bytes tests/data/acpi/q35/DSDT.ivrs | Bin 8291 -> 8291 bytes tests/data/acpi/q35/DSDT.memhp | Bin 9633 -> 9633 bytes tests/data/acpi/q35/DSDT.mmio64 | Bin 9404 -> 9404 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 8568 -> 8568 bytes tests/data/acpi/q35/DSDT.numamem | Bin 8280 -> 8280 bytes tests/data/acpi/q35/DSDT.pvpanic-isa | Bin 8375 -> 8375 bytes tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8880 -> 8880 bytes tests/data/acpi/q35/DSDT.tis.tpm2 | Bin 8906 -> 8906 bytes tests/data/acpi/q35/DSDT.viot | Bin 9383 -> 9383 bytes tests/data/acpi/q35/DSDT.xapic | Bin 35637 -> 35637 bytes 33 files changed, 32 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -32
@@ -1,33 +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.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.applesmc" , -"tests/data/acpi/q35/DSDT.bridge" , -"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.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
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
tests/data/acpi/pc/DSDT.bridge binary +0 -0
tests/data/acpi/pc/DSDT.cphp binary +0 -0
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
tests/data/acpi/pc/DSDT.hpbrroot binary +0 -0
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
tests/data/acpi/pc/DSDT.memhp binary +0 -0
tests/data/acpi/pc/DSDT.numamem binary +0 -0
tests/data/acpi/pc/DSDT.roothp binary +0 -0
tests/data/acpi/q35/DSDT binary +0 -0
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
tests/data/acpi/q35/DSDT.bridge binary +0 -0
tests/data/acpi/q35/DSDT.cphp binary +0 -0
tests/data/acpi/q35/DSDT.cxl binary +0 -0
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
tests/data/acpi/q35/DSDT.memhp binary +0 -0
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
tests/data/acpi/q35/DSDT.numamem binary +0 -0
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
tests/data/acpi/q35/DSDT.viot binary +0 -0
tests/data/acpi/q35/DSDT.xapic binary +0 -0
Signature · 1 line
2.31.1
PATCH 4/17 tests: acpi: whitelist pc/q35 DSDT due to HPET AML move
In reply to Igor Mammedov--- tests/qtest/bios-tables-test-allowed-diff.h | 34 +++++++++++++++++++++ 1 file changed, 34 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +34 -0
@@ -1 +1,35 @@/* 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.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.applesmc" , +"tests/data/acpi/q35/DSDT.bridge" , +"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.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/q35/DSDT.nohpet" , +"tests/data/acpi/pc/DSDT.nohpet",
Signature · 1 line
2.31.1
PATCH 5/17 acpi: x86: refactor PDSM method to reduce nesting
In reply to Igor Mammedov.., it will help with code readability and make easier to extend method in followup patches
--- hw/i386/acpi-build.c | 139 ++++++++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 62 deletions(-)
hw/i386/acpi-build.c +77 -62
@@ -574,9 +574,12 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,Aml *aml_pci_device_dsm (void ) { -Aml *method, *UUID , *ifctx, *ifctx1, *ifctx2, *ifctx3, *elsectx; -Aml *acpi_index =aml_local (0 ); +Aml *method, *UUID , *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 *bnum =aml_arg (4 );Aml *func =aml_arg (2 );Aml *rev =aml_arg (1 );
@@ -584,73 +587,85 @@ Aml *aml_pci_device_dsm(void) method =aml_method ("PDSM" ,6 ,AML_SERIALIZED ); +/* 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); + +aml_append (ifctx, +aml_store (aml_call2 ("AIDX" , bnum, sunum), acpi_index)); +/* +* advertise function 7 if device has acpi-index +* acpi_index values: +* 0: not present (default value) +* FFFFFFFF: not supported (old QEMU without PIDX reg) +* other: device's acpi-index +*/ + ifctx1 =aml_if (aml_lnot ( +aml_or (aml_equal (acpi_index, zero), +aml_equal (acpi_index,aml_int (0xFFFFFFFF )),NULL ) + )); + { +/* have supported functions */ +aml_append (ifctx1,aml_or (caps, one, caps)); +/* support for function 7 */ +aml_append (ifctx1, +aml_or (caps,aml_shiftleft (one,aml_int (7 )), caps)); + } +aml_append (ifctx, ifctx1); + +aml_append (ifctx,aml_store (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. _DSM Definitions for PCI +* 4.6.7. _DSM for Naming a PCI or PCI Express Device Under +* Operating Systems */ -UUID =aml_touuid ("E5C937D0-3553-4D7A-9117-EA4D19C3434D" ); - ifctx =aml_if (aml_equal (aml_arg (0 ),UUID )); + ifctx =aml_if (aml_equal (func,aml_int (7 ))); { -aml_append (ifctx,aml_store (aml_call2 ("AIDX" , bnum, sunum), acpi_index)); - ifctx1 =aml_if (aml_equal (func, zero)); - { -uint8_t byte_list[1 ]; +Aml *pkg =aml_package (2 ); - ifctx2 =aml_if (aml_equal (rev,aml_int (2 ))); - { -/* -* advertise function 7 if device has acpi-index -* acpi_index values: -* 0: not present (default value) -* FFFFFFFF: not supported (old QEMU without PIDX reg) -* other: device's acpi-index -*/ - ifctx3 =aml_if (aml_lnot ( -aml_or (aml_equal (acpi_index, zero), -aml_equal (acpi_index,aml_int (0xFFFFFFFF )),NULL ) - )); - { - byte_list[0 ] = -1 /* have supported functions */ | -1 <<7 /* support for function 7 */ - ; -aml_append (ifctx3,aml_return (aml_buffer (1 , byte_list))); - } -aml_append (ifctx2, ifctx3); - } -aml_append (ifctx1, ifctx2); - - byte_list[0 ] =0 ;/* nothing supported */ -aml_append (ifctx1,aml_return (aml_buffer (1 , byte_list))); - } -aml_append (ifctx, ifctx1); - elsectx =aml_else (); -/* -* PCI Firmware Specification 3.1 -* 4.6.7. _DSM for Naming a PCI or PCI Express Device Under -* Operating Systems -*/ - ifctx1 =aml_if (aml_equal (func,aml_int (7 ))); - { -Aml *pkg =aml_package (2 ); -Aml *ret =aml_local (1 ); - -aml_append (pkg, zero); -/* -* optional, if not impl. should return null string -*/ -aml_append (pkg,aml_string ("%s" ,"" )); -aml_append (ifctx1,aml_store (pkg, ret)); -/* -* update acpi-index to actual value -*/ -aml_append (ifctx1,aml_store (acpi_index,aml_index (ret, zero))); -aml_append (ifctx1,aml_return (ret)); - } -aml_append (elsectx, ifctx1); -aml_append (ifctx, elsectx); +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)); + +aml_append (ifctx,aml_store (aml_call2 ("AIDX" , bnum, sunum), acpi_index)); +/* +* update acpi-index to actual value +*/ +aml_append (ifctx,aml_store (acpi_index,aml_index (ret, zero))); } +aml_append (method, ifctx); +aml_append (method,aml_return (ret));return method; }
Signature · 1 line
2.31.1
PATCH 6/17 x86: acpi: _DSM: use Package to pass parameters
In reply to Igor MammedovNumer of possible arguments to pass to a method is limited in ACPI. The following patches will need to pass over more parameters to PDSM method, will hit that limit.
Prepare for this by passing structure (Package) to method, which let us workaround arguments limitation. Pass to PDSM all standard arguments of _DSM as is, and pack custom parameters into Package that is passed as the last argument to PDSM.
--- hw/i386/acpi-build.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-)
hw/i386/acpi-build.c +27 -13
@@ -431,11 +431,17 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, );aml_append (dev, method); method =aml_method ("_DSM" ,4 ,AML_SERIALIZED ); -aml_append (method, -aml_return (aml_call6 ("PDSM" ,aml_arg (0 ),aml_arg (1 ), -aml_arg (2 ),aml_arg (3 ), -aml_name ("BSEL" ),aml_name ("_SUN" ))) - ); + { +Aml *params =aml_local (0 ); +Aml *pkg =aml_package (2 ); +aml_append (pkg,aml_name ("BSEL" )); +aml_append (pkg,aml_name ("_SUN" )); +aml_append (method,aml_store (pkg, params)); +aml_append (method, +aml_return (aml_call5 ("PDSM" ,aml_arg (0 ),aml_arg (1 ), +aml_arg (2 ),aml_arg (3 ), params)) + ); + }aml_append (dev, method);aml_append (parent_scope, dev);
@@ -480,10 +486,17 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,*/ aml_append (dev,aml_name_decl ("ASUN" ,aml_int (slot))); method =aml_method ("_DSM" ,4 ,AML_SERIALIZED ); -aml_append (method,aml_return ( -aml_call6 ("PDSM" ,aml_arg (0 ),aml_arg (1 ),aml_arg (2 ), -aml_arg (3 ),aml_name ("BSEL" ),aml_name ("ASUN" )) - )); + { +Aml *params =aml_local (0 ); +Aml *pkg =aml_package (2 ); +aml_append (pkg,aml_name ("BSEL" )); +aml_append (pkg,aml_name ("ASUN" )); +aml_append (method,aml_store (pkg, params)); +aml_append (method,aml_return ( +aml_call5 ("PDSM" ,aml_arg (0 ),aml_arg (1 ),aml_arg (2 ), +aml_arg (3 ), params) + )); + }aml_append (dev, method); }
@@ -580,12 +593,13 @@ Aml *aml_pci_device_dsm(void)Aml *acpi_index =aml_local (2 );Aml *zero =aml_int (0 );Aml *one =aml_int (1 ); -Aml *bnum =aml_arg (4 );Aml *func =aml_arg (2 );Aml *rev =aml_arg (1 ); -Aml *sunum =aml_arg (5 ); +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 ))); - method =aml_method ("PDSM" ,6 ,AML_SERIALIZED ); + method =aml_method ("PDSM" ,5 ,AML_SERIALIZED );/* get supported functions */ ifctx =aml_if (aml_equal (func, zero));
@@ -662,10 +676,10 @@ Aml *aml_pci_device_dsm(void)* update acpi-index to actual value */ aml_append (ifctx,aml_store (acpi_index,aml_index (ret, zero))); +aml_append (ifctx,aml_return (ret)); }aml_append (method, ifctx); -aml_append (method,aml_return (ret));return method; }
Signature · 1 line
2.31.1
PATCH 7/17 tests: acpi: update expected blobs
In reply to Igor MammedovAn intermediate blobs update to keep changes (last 2 patches) reviewable.
Includes refactored PDSM that uses Package argument for custom parameters.
===== PDSM taking package as arguments
Return (Local0)
}- Method (PDSM, 6, Serialized)
+ Method (PDSM, 5, Serialized)
{
- If ((Arg0 == ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
+ If ((Arg2 == Zero))
{
- Local0 = AIDX (Arg4, Arg5)
- If ((Arg2 == Zero))
- {
- If ((Arg1 == 0x02))
+ Local0 = Buffer (One)
{- If (!((Local0 == Zero) | (Local0 == 0xFFFFFFFF)))
- {
- Return (Buffer (One)
- {
- 0x81 // .
- })
- }
+ 0x00 // .
}
+ Local1 = Zero
+ If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
+ {+ Return (Local0)
+ }
- Return (Buffer (One)
- {
- 0x00 // .
- })
+ If ((Arg1 < 0x02))
+ {
+ Return (Local0)
}
- ElseIf ((Arg2 == 0x07))
+
+ Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]
+ ))
+ If (!((Local2 == Zero) | (Local2 == 0xFFFFFFFF)))
{- Local1 = Package (0x02)
- {
- Zero,
- ""
- }
- Local1 [Zero] = Local0
- Return (Local1)
+ Local1 |= One
+ Local1 |= (One << 0x07)
}+
+ Local0 [Zero] = Local1
+ Return (Local0)
+ }
+
+ If ((Arg2 == 0x07))
+ {
+ Local0 = Package (0x02)
+ {
+ Zero,
+ ""
+ }
+ Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]
+ ))
+ Local0 [Zero] = Local2
+ Return (Local0)
}
}
} ===== PCI slot using Package to pass arguments to _DSM
Name (ASUN, Zero)
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method {
- Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, ASUN))
+ Local0 = Package (0x02)
+ {
+ BSEL,
+ ASUN
+ }
+ Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
}
} ===== hotpluggable PCI slot using Package to pass arguments to _DSM
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method {
- Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
+ Local0 = Package (0x02)
+ {
+ BSEL,
+ _SUN
+ }
+ Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
}
}--- tests/qtest/bios-tables-test-allowed-diff.h | 34 -------------------- tests/data/acpi/pc/DSDT | Bin 5987 -> 6219 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 5954 -> 6186 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 7312 -> 7544 bytes tests/data/acpi/pc/DSDT.bridge | Bin 8653 -> 9078 bytes tests/data/acpi/pc/DSDT.cphp | Bin 6451 -> 6683 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 7641 -> 7873 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 5954 -> 6186 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6059 -> 6291 bytes tests/data/acpi/pc/DSDT.memhp | Bin 7346 -> 7578 bytes tests/data/acpi/pc/DSDT.nohpet | Bin 5845 -> 6077 bytes tests/data/acpi/pc/DSDT.numamem | Bin 5993 -> 6225 bytes tests/data/acpi/pc/DSDT.roothp | Bin 6195 -> 6434 bytes tests/data/acpi/q35/DSDT | Bin 8274 -> 8320 bytes tests/data/acpi/q35/DSDT.acpierst | Bin 8291 -> 8337 bytes tests/data/acpi/q35/DSDT.acpihmat | Bin 9599 -> 9645 bytes tests/data/acpi/q35/DSDT.applesmc | Bin 8320 -> 8366 bytes tests/data/acpi/q35/DSDT.bridge | Bin 10988 -> 11227 bytes tests/data/acpi/q35/DSDT.cphp | Bin 8738 -> 8784 bytes tests/data/acpi/q35/DSDT.cxl | Bin 9600 -> 9646 bytes tests/data/acpi/q35/DSDT.dimmpxm | Bin 9928 -> 9974 bytes tests/data/acpi/q35/DSDT.ipmibt | Bin 8349 -> 8395 bytes tests/data/acpi/q35/DSDT.ipmismbus | Bin 8363 -> 8409 bytes tests/data/acpi/q35/DSDT.ivrs | Bin 8291 -> 8337 bytes tests/data/acpi/q35/DSDT.memhp | Bin 9633 -> 9679 bytes tests/data/acpi/q35/DSDT.mmio64 | Bin 9404 -> 9450 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 8568 -> 8628 bytes tests/data/acpi/q35/DSDT.nohpet | Bin 8132 -> 8178 bytes tests/data/acpi/q35/DSDT.numamem | Bin 8280 -> 8326 bytes tests/data/acpi/q35/DSDT.pvpanic-isa | Bin 8375 -> 8421 bytes tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8880 -> 8926 bytes tests/data/acpi/q35/DSDT.tis.tpm2 | Bin 8906 -> 8952 bytes tests/data/acpi/q35/DSDT.viot | Bin 9383 -> 9429 bytes tests/data/acpi/q35/DSDT.xapic | Bin 35637 -> 35683 bytes 34 files changed, 34 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -34
@@ -1,35 +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.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.applesmc" , -"tests/data/acpi/q35/DSDT.bridge" , -"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.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/q35/DSDT.nohpet" , -"tests/data/acpi/pc/DSDT.nohpet",
tests/data/acpi/pc/DSDT binary +0 -0
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
tests/data/acpi/pc/DSDT.bridge binary +0 -0
tests/data/acpi/pc/DSDT.cphp binary +0 -0
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
tests/data/acpi/pc/DSDT.memhp binary +0 -0
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
tests/data/acpi/pc/DSDT.numamem binary +0 -0
tests/data/acpi/pc/DSDT.roothp binary +0 -0
tests/data/acpi/q35/DSDT binary +0 -0
tests/data/acpi/q35/DSDT.acpierst binary +0 -0
tests/data/acpi/q35/DSDT.acpihmat binary +0 -0
tests/data/acpi/q35/DSDT.applesmc binary +0 -0
tests/data/acpi/q35/DSDT.bridge binary +0 -0
tests/data/acpi/q35/DSDT.cphp binary +0 -0
tests/data/acpi/q35/DSDT.cxl binary +0 -0
tests/data/acpi/q35/DSDT.dimmpxm binary +0 -0
tests/data/acpi/q35/DSDT.ipmibt binary +0 -0
tests/data/acpi/q35/DSDT.ipmismbus binary +0 -0
tests/data/acpi/q35/DSDT.ivrs binary +0 -0
tests/data/acpi/q35/DSDT.memhp binary +0 -0
tests/data/acpi/q35/DSDT.mmio64 binary +0 -0
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
tests/data/acpi/q35/DSDT.nohpet binary +0 -0
tests/data/acpi/q35/DSDT.numamem binary +0 -0
tests/data/acpi/q35/DSDT.pvpanic-isa binary +0 -0
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
tests/data/acpi/q35/DSDT.viot binary +0 -0
tests/data/acpi/q35/DSDT.xapic binary +0 -0
Signature · 1 line
2.31.1
PATCH 8/17 tests: acpi: whitelist pc/q35 DSDT before switching _DSM to use ASUN
In reply to Igor Mammedov--- tests/qtest/bios-tables-test-allowed-diff.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +14 -0
@@ -1 +1,15 @@/* 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.bridge" , +"tests/data/acpi/q35/DSDT.multi-bridge",
Signature · 1 line
2.31.1
PATCH 9/17 x86: acpi: cleanup PCI device _DSM duplication
In reply to Igor Mammedovadd ASUN variable to hotpluggable slots and use it instead of _SUN which has the same value to reuse _DMS code on both branches (hot- and non-hotpluggable). No functional change.
--- hw/i386/acpi-build.c | 56 +++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 29 deletions(-)
hw/i386/acpi-build.c +27 -29
@@ -374,6 +374,25 @@ build_facs(GArray *table_data)g_array_append_vals (table_data, reserved,40 );/* Reserved */ } +Aml *aml_pci_device_dsm (void ) +{ +Aml *method; + + method =aml_method ("_DSM" ,4 ,AML_SERIALIZED ); + { +Aml *params =aml_local (0 ); +Aml *pkg =aml_package (2 ); +aml_append (pkg,aml_name ("BSEL" )); +aml_append (pkg,aml_name ("ASUN" )); +aml_append (method,aml_store (pkg, params)); +aml_append (method, +aml_return (aml_call5 ("PDSM" ,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;
@@ -423,26 +442,17 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,break ; } dev =aml_device ("S%.02X" , devfn); -aml_append (dev,aml_name_decl ("_SUN" ,aml_int (slot))); +aml_append (dev,aml_name_decl ("ASUN" ,aml_int (slot)));aml_append (dev,aml_name_decl ("_ADR" ,aml_int (adr))); +aml_append (dev,aml_name_decl ("_SUN" ,aml_int (slot))); method =aml_method ("_EJ0" ,1 ,AML_NOTSERIALIZED );aml_append (method,aml_call2 ("PCEJ" ,aml_name ("BSEL" ),aml_name ("_SUN" )) );aml_append (dev, method); - method =aml_method ("_DSM" ,4 ,AML_SERIALIZED ); - { -Aml *params =aml_local (0 ); -Aml *pkg =aml_package (2 ); -aml_append (pkg,aml_name ("BSEL" )); -aml_append (pkg,aml_name ("_SUN" )); -aml_append (method,aml_store (pkg, params)); -aml_append (method, -aml_return (aml_call5 ("PDSM" ,aml_arg (0 ),aml_arg (1 ), -aml_arg (2 ),aml_arg (3 ), params)) - ); - } -aml_append (dev, method); + +aml_append (dev,aml_pci_device_dsm ()); +aml_append (parent_scope, dev);build_append_pcihp_notify_entry (notify_method, slot);
@@ -485,19 +495,7 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,* enumeration order in linux kernel, so use another variable for it */ aml_append (dev,aml_name_decl ("ASUN" ,aml_int (slot))); - method =aml_method ("_DSM" ,4 ,AML_SERIALIZED ); - { -Aml *params =aml_local (0 ); -Aml *pkg =aml_package (2 ); -aml_append (pkg,aml_name ("BSEL" )); -aml_append (pkg,aml_name ("ASUN" )); -aml_append (method,aml_store (pkg, params)); -aml_append (method,aml_return ( -aml_call5 ("PDSM" ,aml_arg (0 ),aml_arg (1 ),aml_arg (2 ), -aml_arg (3 ), params) - )); - } -aml_append (dev, method); +aml_append (dev,aml_pci_device_dsm ()); }if (pc->class_id ==PCI_CLASS_DISPLAY_VGA ) {
@@ -585,7 +583,7 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,qobject_unref (bsel); } -Aml *aml_pci_device_dsm (void ) +static Aml *aml_pci_pdsm (void ) {Aml *method, *UUID , *ifctx, *ifctx1;Aml *ret =aml_local (0 );
@@ -1368,7 +1366,7 @@ static void build_x86_acpi_pci_hotplug(Aml *table, uint64_t pcihp_addr)aml_append (method,aml_return (aml_local (0 )));aml_append (scope, method); -aml_append (scope,aml_pci_device_dsm ()); +aml_append (scope,aml_pci_pdsm ());aml_append (table, scope); }
Signature · 1 line
2.31.1
PATCH 10/17 tests: acpi: update expected blobs
In reply to Igor MammedovIt's expected that hotpluggable slots will, get ASUN variable and use that instead of _SUN with its _DSM method.
For example:
@@ -979,8 +979,9 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001)
Device (S18)
{
- Name (_SUN, 0x03) // _SUN: Slot User Number
+ Name (ASUN, 0x03)
Name (_ADR, 0x00030000) // _ADR: Address
+ Name (_SUN, 0x03) // _SUN: Slot User Number
Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device
{
PCEJ (BSEL, _SUN)
@@ -991,7 +992,7 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001)
Local0 = Package (0x02)
{
BSEL,
- _SUN
+ ASUN
}
Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
}--- tests/qtest/bios-tables-test-allowed-diff.h | 14 -------------- tests/data/acpi/pc/DSDT | Bin 6219 -> 6422 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 6186 -> 6382 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 7544 -> 7747 bytes tests/data/acpi/pc/DSDT.bridge | Bin 9078 -> 9496 bytes tests/data/acpi/pc/DSDT.cphp | Bin 6683 -> 6886 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 7873 -> 8076 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 6186 -> 6382 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6291 -> 6494 bytes tests/data/acpi/pc/DSDT.memhp | Bin 7578 -> 7781 bytes tests/data/acpi/pc/DSDT.nohpet | Bin 6077 -> 6280 bytes tests/data/acpi/pc/DSDT.numamem | Bin 6225 -> 6428 bytes tests/data/acpi/pc/DSDT.roothp | Bin 6434 -> 6656 bytes tests/data/acpi/q35/DSDT.bridge | Bin 11227 -> 11449 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 8628 -> 8640 bytes 15 files changed, 14 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -14
@@ -1,15 +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.bridge" , -"tests/data/acpi/q35/DSDT.multi-bridge",
tests/data/acpi/pc/DSDT binary +0 -0
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
tests/data/acpi/pc/DSDT.bridge binary +0 -0
tests/data/acpi/pc/DSDT.cphp binary +0 -0
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
tests/data/acpi/pc/DSDT.memhp binary +0 -0
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
tests/data/acpi/pc/DSDT.numamem binary +0 -0
tests/data/acpi/pc/DSDT.roothp binary +0 -0
tests/data/acpi/q35/DSDT.bridge binary +0 -0
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
Signature · 1 line
2.31.1
PATCH 11/17 tests: acpi: whitelist pc/q35 DSDT before moving _ADR field
In reply to Igor Mammedov--- tests/qtest/bios-tables-test-allowed-diff.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +14 -0
@@ -1 +1,15 @@/* 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.bridge" , +"tests/data/acpi/q35/DSDT.multi-bridge",
Signature · 1 line
2.31.1
PATCH 12/17 x86: pci: acpi: reorder Device's _ADR and _SUN fields
In reply to Igor Mammedovno functional change, align order of fields in empty slot descriptor with a populated slot ordering. Expected diff:
- Name (_SUN, 0x0X) // _SUN: Slot User Number
Name (_ADR, 0xY) // _ADR: Address
...
+ Name (_SUN, 0xX) // _SUN: Slot User Number
that will eliminate contextual changes (causing test failures) when follow up patches merge code generating populated and empty slots descriptors.
Put mandatory _ADR as the 1st field, then ASUN as it can be present for both pupulated and empty slots and only then _SUN which is present only when slot is hotpluggable.
--- hw/i386/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/acpi-build.c +1 -1
@@ -442,8 +442,8 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,break ; } dev =aml_device ("S%.02X" , devfn); -aml_append (dev,aml_name_decl ("ASUN" ,aml_int (slot)));aml_append (dev,aml_name_decl ("_ADR" ,aml_int (adr))); +aml_append (dev,aml_name_decl ("ASUN" ,aml_int (slot)));aml_append (dev,aml_name_decl ("_SUN" ,aml_int (slot))); method =aml_method ("_EJ0" ,1 ,AML_NOTSERIALIZED ); aml_append(method,
Signature · 1 line
2.31.1
PATCH 13/17 tests: acpi: update expected blobs
In reply to Igor MammedovExpected change:
- Name (_SUN, 0x0X) // _SUN: Slot User Number
Name (_ADR, 0xY) // _ADR: Address
...
+ Name (_SUN, 0xX) // _SUN: Slot User Number
--- tests/qtest/bios-tables-test-allowed-diff.h | 14 -------------- tests/data/acpi/pc/DSDT | Bin 6422 -> 6422 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 6382 -> 6382 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 7747 -> 7747 bytes tests/data/acpi/pc/DSDT.bridge | Bin 9496 -> 9496 bytes tests/data/acpi/pc/DSDT.cphp | Bin 6886 -> 6886 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 8076 -> 8076 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 6382 -> 6382 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6494 -> 6494 bytes tests/data/acpi/pc/DSDT.memhp | Bin 7781 -> 7781 bytes tests/data/acpi/pc/DSDT.nohpet | Bin 6280 -> 6280 bytes tests/data/acpi/pc/DSDT.numamem | Bin 6428 -> 6428 bytes tests/data/acpi/pc/DSDT.roothp | Bin 6656 -> 6656 bytes tests/data/acpi/q35/DSDT.bridge | Bin 11449 -> 11449 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 8640 -> 8640 bytes 15 files changed, 14 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -14
@@ -1,15 +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.bridge" , -"tests/data/acpi/q35/DSDT.multi-bridge",
tests/data/acpi/pc/DSDT binary +0 -0
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
tests/data/acpi/pc/DSDT.bridge binary +0 -0
tests/data/acpi/pc/DSDT.cphp binary +0 -0
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
tests/data/acpi/pc/DSDT.memhp binary +0 -0
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
tests/data/acpi/pc/DSDT.numamem binary +0 -0
tests/data/acpi/pc/DSDT.roothp binary +0 -0
tests/data/acpi/q35/DSDT.bridge binary +0 -0
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
Signature · 1 line
2.31.1
PATCH 14/17 tests: acpi: whitelist pc/q35 DSDT before moving _ADR field
In reply to Igor Mammedov--- tests/qtest/bios-tables-test-allowed-diff.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +14 -0
@@ -1 +1,15 @@/* 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.bridge" , +"tests/data/acpi/q35/DSDT.multi-bridge",
Signature · 1 line
2.31.1
PATCH 15/17 x86: pci: acpi: reorder Device's _DSM method
In reply to Igor Mammedovalign _DSM method in empty slot descriptor with
a populated slot position.
Expected change:
+ Device (SE8)
+ {
+ Name (_ADR, 0x001D0000) // _ADR: Address
+ Name (ASUN, 0x1D)
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
{
Local0 = Package (0x02)
{
BSEL,
ASUN
}
Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
}- }
- Device (SE8)
- {
- Name (_ADR, 0x001D0000) // _ADR: Address
- Name (ASUN, 0x1D)
Name (_SUN, 0x1D) // _SUN: Slot User Number
Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device
{
PCEJ (BSEL, _SUN)
}+ }
i.e. put _DSM right after ASUN, with _SUN/_EJ0 following it.
that will eliminate contextual changes (causing test failures) when follow up patches merge code generating populated and empty slots descriptors.
--- hw/i386/acpi-build.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
hw/i386/acpi-build.c +1 -3
@@ -444,15 +444,13 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, dev =aml_device ("S%.02X" , devfn);aml_append (dev,aml_name_decl ("_ADR" ,aml_int (adr)));aml_append (dev,aml_name_decl ("ASUN" ,aml_int (slot))); +aml_append (dev,aml_pci_device_dsm ());aml_append (dev,aml_name_decl ("_SUN" ,aml_int (slot))); method =aml_method ("_EJ0" ,1 ,AML_NOTSERIALIZED );aml_append (method,aml_call2 ("PCEJ" ,aml_name ("BSEL" ),aml_name ("_SUN" )) );aml_append (dev, method); - -aml_append (dev,aml_pci_device_dsm ()); -aml_append (parent_scope, dev);build_append_pcihp_notify_entry (notify_method, slot);
Signature · 1 line
2.31.1
PATCH 16/17 tests: acpi: update expected blobs
In reply to Igor Mammedov Expected change:
+ Device (SE8)
+ {
+ Name (_ADR, 0x001D0000) // _ADR: Address
+ Name (ASUN, 0x1D)
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method {
Local0 = Package (0x02)
{
BSEL,
ASUN
}
Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
}
- }
- Device (SE8)
- {
- Name (_ADR, 0x001D0000) // _ADR: Address
- Name (ASUN, 0x1D)
Name (_SUN, 0x1D) // _SUN: Slot User Number Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device {
PCEJ (BSEL, _SUN)
}
+ }
--- tests/qtest/bios-tables-test-allowed-diff.h | 14 -------------- tests/data/acpi/pc/DSDT | Bin 6422 -> 6422 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 6382 -> 6382 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 7747 -> 7747 bytes tests/data/acpi/pc/DSDT.bridge | Bin 9496 -> 9496 bytes tests/data/acpi/pc/DSDT.cphp | Bin 6886 -> 6886 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 8076 -> 8076 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 6382 -> 6382 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6494 -> 6494 bytes tests/data/acpi/pc/DSDT.memhp | Bin 7781 -> 7781 bytes tests/data/acpi/pc/DSDT.nohpet | Bin 6280 -> 6280 bytes tests/data/acpi/pc/DSDT.numamem | Bin 6428 -> 6428 bytes tests/data/acpi/pc/DSDT.roothp | Bin 6656 -> 6656 bytes tests/data/acpi/q35/DSDT.bridge | Bin 11449 -> 11449 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 8640 -> 8640 bytes 15 files changed, 14 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -14
@@ -1,15 +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.bridge" , -"tests/data/acpi/q35/DSDT.multi-bridge",
tests/data/acpi/pc/DSDT binary +0 -0
tests/data/acpi/pc/DSDT.acpierst binary +0 -0
tests/data/acpi/pc/DSDT.acpihmat binary +0 -0
tests/data/acpi/pc/DSDT.bridge binary +0 -0
tests/data/acpi/pc/DSDT.cphp binary +0 -0
tests/data/acpi/pc/DSDT.dimmpxm binary +0 -0
tests/data/acpi/pc/DSDT.hpbridge binary +0 -0
tests/data/acpi/pc/DSDT.ipmikcs binary +0 -0
tests/data/acpi/pc/DSDT.memhp binary +0 -0
tests/data/acpi/pc/DSDT.nohpet binary +0 -0
tests/data/acpi/pc/DSDT.numamem binary +0 -0
tests/data/acpi/pc/DSDT.roothp binary +0 -0
tests/data/acpi/q35/DSDT.bridge binary +0 -0
tests/data/acpi/q35/DSDT.multi-bridge binary +0 -0
Signature · 1 line
2.31.1
PATCH 17/17 x86: pci: acpi: deduplate PCI slots creation
In reply to Igor MammedovNo functional change nor AML bytcode change. Consolidate code that generates empty and populated slots descriptors. Beside of eliminating duplication, it helps to consolidate conditions for generating parts of Device{} desriptor in one place, which makes code more compact and easier to read.
--- hw/i386/acpi-build.c | 111 +++++++++++++++++++++---------------------- 1 file changed, 54 insertions(+), 57 deletions(-)
hw/i386/acpi-build.c +54 -57
@@ -427,13 +427,41 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,int func =PCI_FUNC (devfn);/* ACPI spec: 1.0b: Table 6-2 _ADR Object Bus Types, PCI type */ int adr = slot <<16 | func; -bool hotplug_enabled_dev; -bool bridge_in_acpi; -bool cold_plugged_bridge; +bool hotpluggbale_slot = false; +bool bridge_in_acpi = false; +bool cold_plugged_bridge = false; +bool is_vga = false; + +if (pdev) { + pc =PCI_DEVICE_GET_CLASS (pdev); + dc =DEVICE_GET_CLASS (pdev); + +if (pc->class_id ==PCI_CLASS_BRIDGE_ISA ) { +continue ; + } + + is_vga = pc->class_id ==PCI_CLASS_DISPLAY_VGA ; -if (!pdev) {/* -* add hotplug slots for non present devices. +* Cold plugged bridges aren't themselves hot-pluggable. +* Hotplugged bridges *are* hot-pluggable. +*/ + cold_plugged_bridge = pc->is_bridge && !DEVICE (pdev)->hotplugged; + bridge_in_acpi = cold_plugged_bridge && pcihp_bridge_en; + + hotpluggbale_slot = bsel && dc->hotpluggable && + !cold_plugged_bridge; + +/* +* allow describing coldplugged bridges in ACPI even if they are not +* on function 0, as they are not unpluggable, for all other devices +* generate description only for function 0 per slot +*/ +if (func && !bridge_in_acpi) { +continue ; + } + }else { +/* * hotplug is supported only for non-multifunction device * so generate device description only for function 0 */
@@ -441,46 +469,11 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,if (pci_bus_is_express (bus) && slot >0 ) {break ; } - dev =aml_device ("S%.02X" , devfn); -aml_append (dev,aml_name_decl ("_ADR" ,aml_int (adr))); -aml_append (dev,aml_name_decl ("ASUN" ,aml_int (slot))); -aml_append (dev,aml_pci_device_dsm ()); -aml_append (dev,aml_name_decl ("_SUN" ,aml_int (slot))); - method =aml_method ("_EJ0" ,1 ,AML_NOTSERIALIZED ); -aml_append (method, -aml_call2 ("PCEJ" ,aml_name ("BSEL" ),aml_name ("_SUN" )) - ); -aml_append (dev, method); -aml_append (parent_scope, dev); - -build_append_pcihp_notify_entry (notify_method, slot); +/* mark it as empty hotpluggable slot */ + hotpluggbale_slot = true; + }else { +continue ; } -continue ; - } - - pc =PCI_DEVICE_GET_CLASS (pdev); - dc =DEVICE_GET_CLASS (pdev); - -/* -* Cold plugged bridges aren't themselves hot-pluggable. -* Hotplugged bridges *are* hot-pluggable. -*/ - cold_plugged_bridge = pc->is_bridge && !DEVICE (pdev)->hotplugged; - bridge_in_acpi = cold_plugged_bridge && pcihp_bridge_en; - - hotplug_enabled_dev = bsel && dc->hotpluggable && !cold_plugged_bridge; - -if (pc->class_id ==PCI_CLASS_BRIDGE_ISA ) { -continue ; - } - -/* -* allow describing coldplugged bridges in ACPI even if they are not -* on function 0, as they are not unpluggable, for all other devices -* generate description only for function 0 per slot -*/ -if (func && !bridge_in_acpi) { -continue ; }/* start to compose PCI device descriptor */
@@ -496,7 +489,7 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,aml_append (dev,aml_pci_device_dsm ()); } -if (pc->class_id ==PCI_CLASS_DISPLAY_VGA ) { +if (is_vga) {/* add VGA specific AML methods */ int s3d;
@@ -517,19 +510,10 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, method =aml_method ("_S3D" ,0 ,AML_NOTSERIALIZED );aml_append (method,aml_return (aml_int (s3d)));aml_append (dev, method); - }else if (hotplug_enabled_dev) { -aml_append (dev,aml_name_decl ("_SUN" ,aml_int (slot))); -/* add _EJ0 to make slot hotpluggable */ - method =aml_method ("_EJ0" ,1 ,AML_NOTSERIALIZED ); -aml_append (method, -aml_call2 ("PCEJ" ,aml_name ("BSEL" ),aml_name ("_SUN" )) - ); -aml_append (dev, method); + } -if (bsel) { -build_append_pcihp_notify_entry (notify_method, slot); - } - }else if (bridge_in_acpi) { + bridge_in_acpi = cold_plugged_bridge && pcihp_bridge_en; +if (bridge_in_acpi) {/* * device is coldplugged bridge, * add child device descriptions into its scope
@@ -538,6 +522,19 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,build_append_pci_bus_devices (dev, sec_bus, pcihp_bridge_en); } + +if (hotpluggbale_slot) { +aml_append (dev,aml_name_decl ("_SUN" ,aml_int (slot))); +/* add _EJ0 to make slot hotpluggable */ + method =aml_method ("_EJ0" ,1 ,AML_NOTSERIALIZED ); +aml_append (method, +aml_call2 ("PCEJ" ,aml_name ("BSEL" ),aml_name ("_SUN" )) + ); +aml_append (dev, method); + +build_append_pcihp_notify_entry (notify_method, slot); + } +/* device descriptor has been composed, add it into parent context */ aml_append (parent_scope, dev); }
Signature · 1 line
2.31.1
Quoted 5 lines · On Fri, 1 Jul 2022 09:34:58 -0400 Igor Mammedov <[email protected]> wrote:
Flushing out ACPI PCI cleanups that preceed conversion of DSDT PCI slots ennumeration to AcpiDevAmlIf interface. It's is mostly collection of patches thraet removes code duplication, we've accumulated around PCI relaterd AML in DSDT.
ping,
it still applies cleanly to master.
Michael can you pick it up?
Quoted 60 lines
git:
https://gitlab.com/imammedo/qemu.gitx86_pci_cleanupsIgor Mammedov (17):
tests: acpi: whitelist pc/q35 DSDT due to HPET AML move
acpi: x86: deduplicate HPET AML building
tests: acpi: update expected blobs after HPET move
tests: acpi: whitelist pc/q35 DSDT due to HPET AML move
acpi: x86: refactor PDSM method to reduce nesting
x86: acpi:_DSM: use Package to pass parameters
tests: acpi: update expected blobs
tests: acpi: whitelist pc/q35 DSDT before switching_DSMto use ASUN
x86: acpi: cleanup PCI device_DSMduplication
tests: acpi: update expected blobs
tests: acpi: whitelist pc/q35 DSDT before moving_ADRfield
x86: pci: acpi: reorder Device's_ADRand_SUNfields
tests: acpi: update expected blobs
tests: acpi: whitelist pc/q35 DSDT before moving_ADRfield
x86: pci: acpi: reorder Device's_DSMmethod
tests: acpi: update expected blobs
x86: pci: acpi: deduplate PCI slots creationhw/i386/acpi-build.c | 302 ++++++++++++++------------ tests/data/acpi/pc/DSDT | Bin 5987 -> 6422 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 5954 -> 6382 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 7312 -> 7747 bytes tests/data/acpi/pc/DSDT.bridge | Bin 8653 -> 9496 bytes tests/data/acpi/pc/DSDT.cphp | Bin 6451 -> 6886 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 7641 -> 8076 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 5954 -> 6382 bytes tests/data/acpi/pc/DSDT.hpbrroot | Bin 3069 -> 3069 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6059 -> 6494 bytes tests/data/acpi/pc/DSDT.memhp | Bin 7346 -> 7781 bytes tests/data/acpi/pc/DSDT.nohpet | Bin 5845 -> 6280 bytes tests/data/acpi/pc/DSDT.numamem | Bin 5993 -> 6428 bytes tests/data/acpi/pc/DSDT.roothp | Bin 6195 -> 6656 bytes tests/data/acpi/q35/DSDT | Bin 8274 -> 8320 bytes tests/data/acpi/q35/DSDT.acpierst | Bin 8291 -> 8337 bytes tests/data/acpi/q35/DSDT.acpihmat | Bin 9599 -> 9645 bytes tests/data/acpi/q35/DSDT.applesmc | Bin 8320 -> 8366 bytes tests/data/acpi/q35/DSDT.bridge | Bin 10988 -> 11449 bytes tests/data/acpi/q35/DSDT.cphp | Bin 8738 -> 8784 bytes tests/data/acpi/q35/DSDT.cxl | Bin 9600 -> 9646 bytes tests/data/acpi/q35/DSDT.dimmpxm | Bin 9928 -> 9974 bytes tests/data/acpi/q35/DSDT.ipmibt | Bin 8349 -> 8395 bytes tests/data/acpi/q35/DSDT.ipmismbus | Bin 8363 -> 8409 bytes tests/data/acpi/q35/DSDT.ivrs | Bin 8291 -> 8337 bytes tests/data/acpi/q35/DSDT.memhp | Bin 9633 -> 9679 bytes tests/data/acpi/q35/DSDT.mmio64 | Bin 9404 -> 9450 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 8568 -> 8640 bytes tests/data/acpi/q35/DSDT.nohpet | Bin 8132 -> 8178 bytes tests/data/acpi/q35/DSDT.numamem | Bin 8280 -> 8326 bytes tests/data/acpi/q35/DSDT.pvpanic-isa | Bin 8375 -> 8421 bytes tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8880 -> 8926 bytes tests/data/acpi/q35/DSDT.tis.tpm2 | Bin 8906 -> 8952 bytes tests/data/acpi/q35/DSDT.viot | Bin 9383 -> 9429 bytes tests/data/acpi/q35/DSDT.xapic | Bin 35637 -> 35683 bytes 35 files changed, 161 insertions(+), 141 deletions(-)
Quoted 9 lines · Igor Mammedov
Quoted 5 lines · On Fri, 1 Jul 2022 09:34:58 -0400 Igor Mammedov <[email protected]> wrote:
Flushing out ACPI PCI cleanups that preceed conversion of DSDT PCI slots ennumeration to AcpiDevAmlIf interface. It's is mostly collection of patches thraet removes code duplication, we've accumulated around PCI relaterd AML in DSDT.
Quoted 4 lines
ping,
it still applies cleanly to master.Michael can you pick it up?
yes, thanks for the ping!
Quoted 60 lines
Quoted 60 lines
git:
https://gitlab.com/imammedo/qemu.gitx86_pci_cleanupsIgor Mammedov (17):
tests: acpi: whitelist pc/q35 DSDT due to HPET AML move
acpi: x86: deduplicate HPET AML building
tests: acpi: update expected blobs after HPET move
tests: acpi: whitelist pc/q35 DSDT due to HPET AML move
acpi: x86: refactor PDSM method to reduce nesting
x86: acpi:_DSM: use Package to pass parameters
tests: acpi: update expected blobs
tests: acpi: whitelist pc/q35 DSDT before switching_DSMto use ASUN
x86: acpi: cleanup PCI device_DSMduplication
tests: acpi: update expected blobs
tests: acpi: whitelist pc/q35 DSDT before moving_ADRfield
x86: pci: acpi: reorder Device's_ADRand_SUNfields
tests: acpi: update expected blobs
tests: acpi: whitelist pc/q35 DSDT before moving_ADRfield
x86: pci: acpi: reorder Device's_DSMmethod
tests: acpi: update expected blobs
x86: pci: acpi: deduplate PCI slots creationhw/i386/acpi-build.c | 302 ++++++++++++++------------ tests/data/acpi/pc/DSDT | Bin 5987 -> 6422 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 5954 -> 6382 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 7312 -> 7747 bytes tests/data/acpi/pc/DSDT.bridge | Bin 8653 -> 9496 bytes tests/data/acpi/pc/DSDT.cphp | Bin 6451 -> 6886 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 7641 -> 8076 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 5954 -> 6382 bytes tests/data/acpi/pc/DSDT.hpbrroot | Bin 3069 -> 3069 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6059 -> 6494 bytes tests/data/acpi/pc/DSDT.memhp | Bin 7346 -> 7781 bytes tests/data/acpi/pc/DSDT.nohpet | Bin 5845 -> 6280 bytes tests/data/acpi/pc/DSDT.numamem | Bin 5993 -> 6428 bytes tests/data/acpi/pc/DSDT.roothp | Bin 6195 -> 6656 bytes tests/data/acpi/q35/DSDT | Bin 8274 -> 8320 bytes tests/data/acpi/q35/DSDT.acpierst | Bin 8291 -> 8337 bytes tests/data/acpi/q35/DSDT.acpihmat | Bin 9599 -> 9645 bytes tests/data/acpi/q35/DSDT.applesmc | Bin 8320 -> 8366 bytes tests/data/acpi/q35/DSDT.bridge | Bin 10988 -> 11449 bytes tests/data/acpi/q35/DSDT.cphp | Bin 8738 -> 8784 bytes tests/data/acpi/q35/DSDT.cxl | Bin 9600 -> 9646 bytes tests/data/acpi/q35/DSDT.dimmpxm | Bin 9928 -> 9974 bytes tests/data/acpi/q35/DSDT.ipmibt | Bin 8349 -> 8395 bytes tests/data/acpi/q35/DSDT.ipmismbus | Bin 8363 -> 8409 bytes tests/data/acpi/q35/DSDT.ivrs | Bin 8291 -> 8337 bytes tests/data/acpi/q35/DSDT.memhp | Bin 9633 -> 9679 bytes tests/data/acpi/q35/DSDT.mmio64 | Bin 9404 -> 9450 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 8568 -> 8640 bytes tests/data/acpi/q35/DSDT.nohpet | Bin 8132 -> 8178 bytes tests/data/acpi/q35/DSDT.numamem | Bin 8280 -> 8326 bytes tests/data/acpi/q35/DSDT.pvpanic-isa | Bin 8375 -> 8421 bytes tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8880 -> 8926 bytes tests/data/acpi/q35/DSDT.tis.tpm2 | Bin 8906 -> 8952 bytes tests/data/acpi/q35/DSDT.viot | Bin 9383 -> 9429 bytes tests/data/acpi/q35/DSDT.xapic | Bin 35637 -> 35683 bytes 35 files changed, 161 insertions(+), 141 deletions(-)
Quoted 10 lines · On Tue, 6 Sep 2022 09:10:32 -0400 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 9 lines · Igor Mammedov
Quoted 5 lines · On Fri, 1 Jul 2022 09:34:58 -0400 Igor Mammedov <[email protected]> wrote:
Flushing out ACPI PCI cleanups that preceed conversion of DSDT PCI slots ennumeration to AcpiDevAmlIf interface. It's is mostly collection of patches thraet removes code duplication, we've accumulated around PCI relaterd AML in DSDT.
Quoted 6 lines
Quoted 4 lines
ping,
it still applies cleanly to master.Michael can you pick it up?
yes, thanks for the ping!
ping?
Quoted 62 lines
Quoted 61 lines
Quoted 61 lines
git:
https://gitlab.com/imammedo/qemu.gitx86_pci_cleanupsIgor Mammedov (17):
tests: acpi: whitelist pc/q35 DSDT due to HPET AML move
acpi: x86: deduplicate HPET AML building
tests: acpi: update expected blobs after HPET move
tests: acpi: whitelist pc/q35 DSDT due to HPET AML move
acpi: x86: refactor PDSM method to reduce nesting
x86: acpi:_DSM: use Package to pass parameters
tests: acpi: update expected blobs
tests: acpi: whitelist pc/q35 DSDT before switching_DSMto use ASUN
x86: acpi: cleanup PCI device_DSMduplication
tests: acpi: update expected blobs
tests: acpi: whitelist pc/q35 DSDT before moving_ADRfield
x86: pci: acpi: reorder Device's_ADRand_SUNfields
tests: acpi: update expected blobs
tests: acpi: whitelist pc/q35 DSDT before moving_ADRfield
x86: pci: acpi: reorder Device's_DSMmethod
tests: acpi: update expected blobs
x86: pci: acpi: deduplate PCI slots creationhw/i386/acpi-build.c | 302 ++++++++++++++------------ tests/data/acpi/pc/DSDT | Bin 5987 -> 6422 bytes tests/data/acpi/pc/DSDT.acpierst | Bin 5954 -> 6382 bytes tests/data/acpi/pc/DSDT.acpihmat | Bin 7312 -> 7747 bytes tests/data/acpi/pc/DSDT.bridge | Bin 8653 -> 9496 bytes tests/data/acpi/pc/DSDT.cphp | Bin 6451 -> 6886 bytes tests/data/acpi/pc/DSDT.dimmpxm | Bin 7641 -> 8076 bytes tests/data/acpi/pc/DSDT.hpbridge | Bin 5954 -> 6382 bytes tests/data/acpi/pc/DSDT.hpbrroot | Bin 3069 -> 3069 bytes tests/data/acpi/pc/DSDT.ipmikcs | Bin 6059 -> 6494 bytes tests/data/acpi/pc/DSDT.memhp | Bin 7346 -> 7781 bytes tests/data/acpi/pc/DSDT.nohpet | Bin 5845 -> 6280 bytes tests/data/acpi/pc/DSDT.numamem | Bin 5993 -> 6428 bytes tests/data/acpi/pc/DSDT.roothp | Bin 6195 -> 6656 bytes tests/data/acpi/q35/DSDT | Bin 8274 -> 8320 bytes tests/data/acpi/q35/DSDT.acpierst | Bin 8291 -> 8337 bytes tests/data/acpi/q35/DSDT.acpihmat | Bin 9599 -> 9645 bytes tests/data/acpi/q35/DSDT.applesmc | Bin 8320 -> 8366 bytes tests/data/acpi/q35/DSDT.bridge | Bin 10988 -> 11449 bytes tests/data/acpi/q35/DSDT.cphp | Bin 8738 -> 8784 bytes tests/data/acpi/q35/DSDT.cxl | Bin 9600 -> 9646 bytes tests/data/acpi/q35/DSDT.dimmpxm | Bin 9928 -> 9974 bytes tests/data/acpi/q35/DSDT.ipmibt | Bin 8349 -> 8395 bytes tests/data/acpi/q35/DSDT.ipmismbus | Bin 8363 -> 8409 bytes tests/data/acpi/q35/DSDT.ivrs | Bin 8291 -> 8337 bytes tests/data/acpi/q35/DSDT.memhp | Bin 9633 -> 9679 bytes tests/data/acpi/q35/DSDT.mmio64 | Bin 9404 -> 9450 bytes tests/data/acpi/q35/DSDT.multi-bridge | Bin 8568 -> 8640 bytes tests/data/acpi/q35/DSDT.nohpet | Bin 8132 -> 8178 bytes tests/data/acpi/q35/DSDT.numamem | Bin 8280 -> 8326 bytes tests/data/acpi/q35/DSDT.pvpanic-isa | Bin 8375 -> 8421 bytes tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8880 -> 8926 bytes tests/data/acpi/q35/DSDT.tis.tpm2 | Bin 8906 -> 8952 bytes tests/data/acpi/q35/DSDT.viot | Bin 9383 -> 9429 bytes tests/data/acpi/q35/DSDT.xapic | Bin 35637 -> 35683 bytes 35 files changed, 161 insertions(+), 141 deletions(-)