acpi: Some fixes for pxb support for ARM virt machine
v4 cover acpi: Some fixes for pxb support for ARM virt machine
This patch series adds some fixes for ARM virt machine pxb support.
1. Pass addr offset for IO, MMIO and bus number when builing crs, because the addr_trans is needed to describe an addr resource. [1]
2. Inform guest os not to ignore the resource map generated by firmware as the x86 default way. [2]
3. Enable pxb for ARM virt machine by default.
4. Update expected DSDT files with the above changes and enable the pxb unit-test.
v3->v4:
* Separate the patch of ordering root buses for further discussion. [3]
v2->v3:
* Reorder the root bridges.
* Exclude resources of extra root bridges from main root bridge's _CRS.
v1->v2:
* Update expected DSDT files.
* Quote PCI Firmware spec as comments.
[1]: https://lore.kernel.org/qemu-devel/[email protected]/
[2]: https://lore.kernel.org/qemu-devel/[email protected]/
[3]: https://lore.kernel.org/qemu-devel/[email protected]/
Jiahui Cen (8):
acpi: Allow DSDT acpi table changes
acpi: Fix unmatched expected DSDT.pxb file
acpi: Add addr offset in build_crs acpi/gpex: Inform os to keep firmware resource map acpi/gpex: Exclude pxb's resources from PCI0
Kconfig: Compile PXB for ARM_VIRT
acpi: Enable pxb unit-test for ARM virt machine
acpi: Update _DSM method in expected files
hw/acpi/aml-build.c | 18 ++-- hw/i386/acpi-build.c | 3 +- hw/pci-bridge/Kconfig | 2 +- hw/pci-host/gpex-acpi.c | 87 ++++++++++++++------ include/hw/acpi/aml-build.h | 4 +- tests/data/acpi/microvm/DSDT.pcie | Bin 3023 -> 3031 bytes tests/data/acpi/virt/DSDT | Bin 5196 -> 5204 bytes tests/data/acpi/virt/DSDT.memhp | Bin 6557 -> 6565 bytes tests/data/acpi/virt/DSDT.numamem | Bin 5196 -> 5204 bytes tests/data/acpi/virt/DSDT.pxb | Bin 7802 -> 7689 bytes tests/qtest/bios-tables-test.c | 4 - 11 files changed, 79 insertions(+), 39 deletions(-)
Signature · 1 line
2.29.2
PATCH v4 1/8 acpi: Allow DSDT acpi table changes
--- tests/qtest/bios-tables-test-allowed-diff.h | 5 +++++ 1 file changed, 5 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +5 -0
@@ -1 +1,6 @@/* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/microvm/DSDT.pcie" , +"tests/data/acpi/virt/DSDT" , +"tests/data/acpi/virt/DSDT.memhp" , +"tests/data/acpi/virt/DSDT.numamem" , +"tests/data/acpi/virt/DSDT.pxb",
Signature · 1 line
2.29.2
PATCH v4 2/8 acpi: Fix unmatched expected DSDT.pxb file
In reply to Jiahui CenCommit fe1127da11 ("unit-test: Add the binary file and clear diff.h") does not use the up-to-date expected file for pxb for ARM virt.
Fix the expected DSDT.pxb file.
Full diff of changed file disassembly:
tmp/new/tests/data/acpi/virt/DSDT.pxb.dsl 2021-01-07 17:11:59.566831080 +0800 renamed from tmp/old/tests/data/acpi/virt/DSDT.pxb.dsl 2021-01-07 17:04:51.246831080 +0800 +33 -66
@@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x00001E7A (7802) + * Length 0x00001DF9 (7673) * Revision 0x02 - * Checksum 0x57 + * Checksum 0x42 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1)
@@ -45,32 +45,6 @@ }) } - Device (FLS0) - { - Name (_HID, "LNRO0015") // _HID: Hardware ID - Name (_UID, Zero) // _UID: Unique ID - Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings - { - Memory32Fixed (ReadWrite, - 0x00000000, // Address Base - 0x04000000, // Address Length - ) - }) - } - - Device (FLS1) - { - Name (_HID, "LNRO0015") // _HID: Hardware ID - Name (_UID, One) // _UID: Unique ID - Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings - { - Memory32Fixed (ReadWrite, - 0x04000000, // Address Base - 0x04000000, // Address Length - ) - }) - } - Device (FWCF) { Name (_HID, "QEMU0002") // _HID: Hardware ID
@@ -665,9 +639,6 @@ { Name (_HID, "PNP0A08" /* PCI Express Bus */) // _HID: Hardware ID Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID - Name (_ADR, Zero) // _ADR: Address - Name (_CCA, One) // _CCA: Cache Coherency Attribute - Name (_SEG, Zero) // _SEG: PCI Segment Name (_BBN, 0x80) // _BBN: BIOS Bus Number Name (_UID, 0x80) // _UID: Unique ID Name (_STR, Unicode ("pxb Device")) // _STR: Description String
@@ -1857,7 +1828,7 @@ Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID Name (_SEG, Zero) // _SEG: PCI Segment Name (_BBN, Zero) // _BBN: BIOS Bus Number - Name (_UID, "PCI0") // _UID: Unique ID + Name (_UID, Zero) // _UID: Unique ID Name (_STR, Unicode ("PCIe 0 Device")) // _STR: Description String Name (_CCA, One) // _CCA: Cache Coherency Attribute Name (_PRT, Package (0x80) // _PRT: PCI Routing Table
@@ -2983,41 +2954,37 @@ Return (0x0000004010000000) } - Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { - Return (ResourceTemplate () - { - WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, - 0x0000, // Granularity - 0x0000, // Range Minimum - 0x007F, // Range Maximum - 0x0000, // Translation Offset - 0x0080, // Length - ,, ) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, - 0x00000000, // Granularity - 0x10000000, // Range Minimum - 0x3EFEFFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x2EFF0000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, - 0x00000000, // Granularity - 0x00000000, // Range Minimum - 0x0000FFFF, // Range Maximum - 0x3EFF0000, // Translation Offset - 0x00010000, // Length - ,, , TypeStatic, DenseTranslation) - QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, - 0x0000000000000000, // Granularity - 0x0000008000000000, // Range Minimum - 0x000000FFFFFFFFFF, // Range Maximum - 0x0000000000000000, // Translation Offset - 0x0000008000000000, // Length - ,, , AddressRangeMemory, TypeStatic) - }) - } - + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0000, // Range Minimum + 0x007F, // Range Maximum + 0x0000, // Translation Offset + 0x0080, // Length + ,, ) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, + 0x00000000, // Granularity + 0x10000000, // Range Minimum + 0x3EFEFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x2EFF0000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, + 0x00000000, // Granularity + 0x00000000, // Range Minimum + 0x0000FFFF, // Range Maximum + 0x3EFF0000, // Translation Offset + 0x00010000, // Length + ,, , TypeStatic, DenseTranslation) + QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, + 0x0000000000000000, // Granularity + 0x0000008000000000, // Range Minimum + 0x000000FFFFFFFFFF, // Range Maximum + 0x0000000000000000, // Translation Offset + 0x0000008000000000, // Length + ,, , AddressRangeMemory, TypeStatic) + }) Name (SUPP, Zero) Name (CTRL, Zero) Method (_OSC, 4, NotSerialized) // _OSC: Operating System Capabilities
--- tests/data/acpi/virt/DSDT.pxb | Bin 7802 -> 7673 bytes 1 file changed, 0 insertions(+), 0 deletions(-)
tests/data/acpi/virt/DSDT.pxb binary +0 -0
Signature · 1 line
2.29.2
Re: [PATCH v4 2/8] acpi: Fix unmatched expected DSDT.pxb file
Quoted 9 lines · Jiahui Cen
Commit
fe1127da11("unit-test: Add the binary file and cleardiff.h") does not use the up-to-date expected file for pxb for ARM virt.Fix the expected DSDT.pxb file.
Full diff of changed file disassembly:
diff -ru
/tmp/old/tests/data/acpi/virt/DSDT.pxb.dsl/tmp/new/tests/data/acpi/virt/DSDT.pxb.dsl---/tmp/old/tests/data/acpi/virt/DSDT.pxb.dsl2021-01-07 17:04:51.246831080 +0800
This --- sign confuses git am. You shouldn't put this in the commit log really ...
Quoted 159 lines
+++
/tmp/new/tests/data/acpi/virt/DSDT.pxb.dsl2021-01-07 17:11:59.566831080 +0800tmp/new/tests/data/acpi/virt/DSDT.pxb.dsl 2021-01-07 17:11:59.566831080 +0800 renamed from tmp/old/tests/data/acpi/virt/DSDT.pxb.dsl 2021-01-07 17:04:51.246831080 +0800 +33
-66@@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x00001E7A (7802) + * Length 0x00001DF9 (7673) * Revision 0x02 - * Checksum 0x57 + * Checksum 0x42 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1)@@ -45,32 +45,6 @@ }) } - Device (FLS0) - { - Name (_HID, "LNRO0015") // _HID: Hardware ID - Name (_UID, Zero) // _UID: Unique ID - Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings - { - Memory32Fixed (ReadWrite, - 0x00000000, // Address Base - 0x04000000, // Address Length - ) - }) - } - - Device (FLS1) - { - Name (_HID, "LNRO0015") // _HID: Hardware ID - Name (_UID, One) // _UID: Unique ID - Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings - { - Memory32Fixed (ReadWrite, - 0x04000000, // Address Base - 0x04000000, // Address Length - ) - }) - } - Device (FWCF) { Name (_HID, "QEMU0002") // _HID: Hardware ID@@ -665,9 +639,6 @@ { Name (_HID, "PNP0A08" /* PCI Express Bus */) // _HID: Hardware ID Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID - Name (_ADR, Zero) // _ADR: Address - Name (_CCA, One) // _CCA: Cache Coherency Attribute - Name (_SEG, Zero) // _SEG: PCI Segment Name (_BBN, 0x80) // _BBN: BIOS Bus Number Name (_UID, 0x80) // _UID: Unique ID Name (_STR, Unicode ("pxb Device")) // _STR: Description String@@ -1857,7 +1828,7 @@ Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID Name (_SEG, Zero) // _SEG: PCI Segment Name (_BBN, Zero) // _BBN: BIOS Bus Number - Name (_UID, "PCI0") // _UID: Unique ID + Name (_UID, Zero) // _UID: Unique ID Name (_STR, Unicode ("PCIe 0 Device")) // _STR: Description String Name (_CCA, One) // _CCA: Cache Coherency Attribute Name (_PRT, Package (0x80) // _PRT: PCI Routing Table@@ -2983,41 +2954,37 @@ Return (0x0000004010000000) } - Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { - Return (ResourceTemplate () - { - WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, - 0x0000, // Granularity - 0x0000, // Range Minimum - 0x007F, // Range Maximum - 0x0000, // Translation Offset - 0x0080, // Length - ,, ) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, - 0x00000000, // Granularity - 0x10000000, // Range Minimum - 0x3EFEFFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x2EFF0000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, - 0x00000000, // Granularity - 0x00000000, // Range Minimum - 0x0000FFFF, // Range Maximum - 0x3EFF0000, // Translation Offset - 0x00010000, // Length - ,, , TypeStatic, DenseTranslation) - QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, - 0x0000000000000000, // Granularity - 0x0000008000000000, // Range Minimum - 0x000000FFFFFFFFFF, // Range Maximum - 0x0000000000000000, // Translation Offset - 0x0000008000000000, // Length - ,, , AddressRangeMemory, TypeStatic) - }) - } - + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0000, // Range Minimum + 0x007F, // Range Maximum + 0x0000, // Translation Offset + 0x0080, // Length + ,, ) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, + 0x00000000, // Granularity + 0x10000000, // Range Minimum + 0x3EFEFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x2EFF0000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, + 0x00000000, // Granularity + 0x00000000, // Range Minimum + 0x0000FFFF, // Range Maximum + 0x3EFF0000, // Translation Offset + 0x00010000, // Length + ,, , TypeStatic, DenseTranslation) + QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, + 0x0000000000000000, // Granularity + 0x0000008000000000, // Range Minimum + 0x000000FFFFFFFFFF, // Range Maximum + 0x0000000000000000, // Translation Offset + 0x0000008000000000, // Length + ,, , AddressRangeMemory, TypeStatic) + }) Name (SUPP, Zero) Name (CTRL, Zero) Method (_OSC, 4, NotSerialized) // _OSC: Operating System CapabilitiesFixes fe1127da11 ("unit-test: Add the binary file and clear diff.h")Signed-off-by Jiahui Cen <[email protected]>--- tests/data/acpi/virt/DSDT.pxb | Bin 7802 -> 7673 bytes 1 file changed, 0 insertions(+), 0 deletions(-)tests/data/acpi/virt/DSDT.pxb binary +0
-0Signature · 2 lines
-- 2.29.2
Re: [PATCH v4 2/8] acpi: Fix unmatched expected DSDT.pxb file
Hi Michael,
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Jiahui Cen
Commit
fe1127da11("unit-test: Add the binary file and cleardiff.h") does not use the up-to-date expected file for pxb for ARM virt.Fix the expected DSDT.pxb file.
Quoted 8 lines
Quoted 4 lines
Full diff of changed file disassembly:
diff -ru
/tmp/old/tests/data/acpi/virt/DSDT.pxb.dsl/tmp/new/tests/data/acpi/virt/DSDT.pxb.dsl---/tmp/old/tests/data/acpi/virt/DSDT.pxb.dsl2021-01-07 17:04:51.246831080 +0800This --- sign confuses git am. You shouldn't put this in the commit log really ...
Yes, it does confuse. I found there were some patches with commit log like this, so I did the same :(
So, I'll modify the commit logs and resend them.
Thanks,
Jiahui
Quoted 163 lines
Quoted 160 lines
+++
/tmp/new/tests/data/acpi/virt/DSDT.pxb.dsl2021-01-07 17:11:59.566831080 +0800tmp/new/tests/data/acpi/virt/DSDT.pxb.dsl 2021-01-07 17:11:59.566831080 +0800 renamed from tmp/old/tests/data/acpi/virt/DSDT.pxb.dsl 2021-01-07 17:04:51.246831080 +0800 +33
-66@@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x00001E7A (7802) + * Length 0x00001DF9 (7673) * Revision 0x02 - * Checksum 0x57 + * Checksum 0x42 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1)@@ -45,32 +45,6 @@ }) } - Device (FLS0) - { - Name (_HID, "LNRO0015") // _HID: Hardware ID - Name (_UID, Zero) // _UID: Unique ID - Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings - { - Memory32Fixed (ReadWrite, - 0x00000000, // Address Base - 0x04000000, // Address Length - ) - }) - } - - Device (FLS1) - { - Name (_HID, "LNRO0015") // _HID: Hardware ID - Name (_UID, One) // _UID: Unique ID - Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings - { - Memory32Fixed (ReadWrite, - 0x04000000, // Address Base - 0x04000000, // Address Length - ) - }) - } - Device (FWCF) { Name (_HID, "QEMU0002") // _HID: Hardware ID@@ -665,9 +639,6 @@ { Name (_HID, "PNP0A08" /* PCI Express Bus */) // _HID: Hardware ID Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID - Name (_ADR, Zero) // _ADR: Address - Name (_CCA, One) // _CCA: Cache Coherency Attribute - Name (_SEG, Zero) // _SEG: PCI Segment Name (_BBN, 0x80) // _BBN: BIOS Bus Number Name (_UID, 0x80) // _UID: Unique ID Name (_STR, Unicode ("pxb Device")) // _STR: Description String@@ -1857,7 +1828,7 @@ Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID Name (_SEG, Zero) // _SEG: PCI Segment Name (_BBN, Zero) // _BBN: BIOS Bus Number - Name (_UID, "PCI0") // _UID: Unique ID + Name (_UID, Zero) // _UID: Unique ID Name (_STR, Unicode ("PCIe 0 Device")) // _STR: Description String Name (_CCA, One) // _CCA: Cache Coherency Attribute Name (_PRT, Package (0x80) // _PRT: PCI Routing Table@@ -2983,41 +2954,37 @@ Return (0x0000004010000000) } - Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { - Return (ResourceTemplate () - { - WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, - 0x0000, // Granularity - 0x0000, // Range Minimum - 0x007F, // Range Maximum - 0x0000, // Translation Offset - 0x0080, // Length - ,, ) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, - 0x00000000, // Granularity - 0x10000000, // Range Minimum - 0x3EFEFFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x2EFF0000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, - 0x00000000, // Granularity - 0x00000000, // Range Minimum - 0x0000FFFF, // Range Maximum - 0x3EFF0000, // Translation Offset - 0x00010000, // Length - ,, , TypeStatic, DenseTranslation) - QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, - 0x0000000000000000, // Granularity - 0x0000008000000000, // Range Minimum - 0x000000FFFFFFFFFF, // Range Maximum - 0x0000000000000000, // Translation Offset - 0x0000008000000000, // Length - ,, , AddressRangeMemory, TypeStatic) - }) - } - + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, + 0x0000, // Granularity + 0x0000, // Range Minimum + 0x007F, // Range Maximum + 0x0000, // Translation Offset + 0x0080, // Length + ,, ) + DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, + 0x00000000, // Granularity + 0x10000000, // Range Minimum + 0x3EFEFFFF, // Range Maximum + 0x00000000, // Translation Offset + 0x2EFF0000, // Length + ,, , AddressRangeMemory, TypeStatic) + DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, + 0x00000000, // Granularity + 0x00000000, // Range Minimum + 0x0000FFFF, // Range Maximum + 0x3EFF0000, // Translation Offset + 0x00010000, // Length + ,, , TypeStatic, DenseTranslation) + QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, + 0x0000000000000000, // Granularity + 0x0000008000000000, // Range Minimum + 0x000000FFFFFFFFFF, // Range Maximum + 0x0000000000000000, // Translation Offset + 0x0000008000000000, // Length + ,, , AddressRangeMemory, TypeStatic) + }) Name (SUPP, Zero) Name (CTRL, Zero) Method (_OSC, 4, NotSerialized) // _OSC: Operating System CapabilitiesFixes fe1127da11 ("unit-test: Add the binary file and clear diff.h")Signed-off-by Jiahui Cen <[email protected]>--- tests/data/acpi/virt/DSDT.pxb | Bin 7802 -> 7673 bytes 1 file changed, 0 insertions(+), 0 deletions(-)tests/data/acpi/virt/DSDT.pxb binary +0
-0Signature · 2 lines
-- 2.29.2.
Re: [PATCH v4 2/8] acpi: Fix unmatched expected DSDT.pxb file
Quoted 14 lines · Jiahui Cen
Hi Michael,
Quoted 11 lines · Michael S. Tsirkin
Quoted 9 lines · Jiahui Cen
Commit
fe1127da11("unit-test: Add the binary file and cleardiff.h") does not use the up-to-date expected file for pxb for ARM virt.Fix the expected DSDT.pxb file.
Full diff of changed file disassembly:
diff -ru
/tmp/old/tests/data/acpi/virt/DSDT.pxb.dsl/tmp/new/tests/data/acpi/virt/DSDT.pxb.dsl---/tmp/old/tests/data/acpi/virt/DSDT.pxb.dsl2021-01-07 17:04:51.246831080 +0800
Quoted 8 lines
Quoted 3 lines
This --- sign confuses git am. You shouldn't put this in the commit log really ...
Yes, it does confuse. I found there were some patches with commit log like this, so I did the same :(
So, I'll modify the commit logs and resend them.
It's OK to include diffs in the commit message or in the Notes section of the patch, in general, but such diffs should always be indented, or quoted in email-style (angle bracket on the left side), covering *all* parts of the diff (headers, hunk headers, etc).
Laszlo
PATCH v4 3/8 acpi: Add addr offset in build_crs
In reply to Jiahui CenAML needs Address Translation offset to describe how a bridge translates addresses accross the bridge when using an address descriptor, and especially on ARM, the translation offset of pio resource is usually non zero.
Therefore, it's necessary to pass offset for pio, mmio32, mmio64 and bus number into build_crs.
--- hw/acpi/aml-build.c | 18 ++++++++++-------- hw/i386/acpi-build.c | 3 ++- hw/pci-host/gpex-acpi.c | 3 ++- include/hw/acpi/aml-build.h | 4 +++- 4 files changed, 17 insertions(+), 11 deletions(-)
hw/acpi/aml-build.c +10 -8
@@ -2076,7 +2076,9 @@ void build_tpm2(GArray *table_data, BIOSLinker *linker, GArray *tcpalog) tpm2_ptr, "TPM2", table_data->len - tpm2_start, 4, NULL, NULL); } -Aml *build_crs (PCIHostState *host,CrsRangeSet *range_set) +Aml *build_crs (PCIHostState *host,CrsRangeSet *range_set,uint32_t io_offset, +uint32_t mmio32_offset,uint64_t mmio64_offset, +uint16_t bus_nr_offset) {Aml *crs =aml_resource_template ();CrsRangeSet temp_range_set;
@@ -2189,10 +2191,10 @@ Aml *build_crs(PCIHostState *host, CrsRangeSet *range_set)for (i =0 ; i < temp_range_set.io_ranges->len; i++) { entry =g_ptr_array_index (temp_range_set.io_ranges, i);aml_append (crs, -aml_word_io (AML_MIN_FIXED ,AML_MAX_FIXED , -AML_POS_DECODE ,AML_ENTIRE_RANGE , -0 , entry->base, entry->limit,0 , - entry->limit - entry->base +1 )); +aml_dword_io (AML_MIN_FIXED ,AML_MAX_FIXED , +AML_POS_DECODE ,AML_ENTIRE_RANGE , +0 , entry->base, entry->limit, io_offset, + entry->limit - entry->base +1 ));crs_range_insert (range_set->io_ranges, entry->base, entry->limit); }
@@ -2205,7 +2207,7 @@ Aml *build_crs(PCIHostState *host, CrsRangeSet *range_set)aml_dword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED ,AML_NON_CACHEABLE ,AML_READ_WRITE , -0 , entry->base, entry->limit,0 , +0 , entry->base, entry->limit, mmio32_offset, entry->limit - entry->base + 1));crs_range_insert (range_set->mem_ranges, entry->base, entry->limit); }
@@ -2217,7 +2219,7 @@ Aml *build_crs(PCIHostState *host, CrsRangeSet *range_set)aml_qword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED ,AML_NON_CACHEABLE ,AML_READ_WRITE , -0 , entry->base, entry->limit,0 , +0 , entry->base, entry->limit, mmio64_offset, entry->limit - entry->base + 1));crs_range_insert (range_set->mem_64bit_ranges, entry->base, entry->limit);
@@ -2230,7 +2232,7 @@ Aml *build_crs(PCIHostState *host, CrsRangeSet *range_set)0 ,pci_bus_num (host->bus), max_bus, -0 , + bus_nr_offset, max_bus - pci_bus_num(host->bus) + 1));return crs;
hw/i386/acpi-build.c +2 -1
@@ -1360,7 +1360,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, }aml_append (dev,build_prt (false)); - crs =build_crs (PCI_HOST_BRIDGE (BUS (bus)->parent), &crs_range_set); + crs =build_crs (PCI_HOST_BRIDGE (BUS (bus)->parent), &crs_range_set, +0 ,0 ,0 ,0 );aml_append (dev,aml_name_decl ("_CRS" , crs));aml_append (scope, dev);aml_append (dsdt, scope);
hw/pci-host/gpex-acpi.c +2 -1
@@ -168,7 +168,8 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg)* 1. The resources the pci-brige/pcie-root-port need. * 2. The resources the devices behind pxb need. */ - crs =build_crs (PCI_HOST_BRIDGE (BUS (bus)->parent), &crs_range_set); + crs =build_crs (PCI_HOST_BRIDGE (BUS (bus)->parent), &crs_range_set, + cfg->pio.base,0 ,0 ,0 );aml_append (dev,aml_name_decl ("_CRS" , crs));acpi_dsdt_add_pci_osc (dev);
include/hw/acpi/aml-build.h +3 -1
@@ -452,7 +452,9 @@ void crs_replace_with_free_ranges(GPtrArray *ranges,void crs_range_set_init (CrsRangeSet *range_set);void crs_range_set_free (CrsRangeSet *range_set); -Aml *build_crs (PCIHostState *host,CrsRangeSet *range_set); +Aml *build_crs (PCIHostState *host,CrsRangeSet *range_set,uint32_t io_offset, +uint32_t mmio32_offset,uint64_t mmio64_offset, +uint16_t bus_nr_offset);void build_srat_memory (AcpiSratMemoryAffinity *numamem,uint64_t base,uint64_t len,int node,MemoryAffinityFlags flags);
Signature · 1 line
2.29.2
PATCH v4 4/8 acpi/gpex: Inform os to keep firmware resource map
In reply to Jiahui CenThere may be some differences in pci resource assignment between guest os and firmware.
Eg. A Bridge with Bus [d2]
-+-[0000:d2]---01.0-[d3]----01.0
where [d2:01.00] is a pcie-pci-bridge with BAR0 (mem, 64-bit, non-pref) [size=256]
[d3:01.00] is a PCI Device with BAR0 (mem, 64-bit, pref) [size=128K]
BAR4 (mem, 64-bit, pref) [size=64M]
In EDK2, the Resource Map would be:
PciBus: Resource Map for Bridge [D2|01|00]
Type = PMem64; Base = 0x8004000000; Length = 0x4100000; Alignment = 0x3FFFFFF
Base = 0x8004000000; Length = 0x4000000; Alignment = 0x3FFFFFF; Owner = PCI [D3|01|00:20]
Base = 0x8008000000; Length = 0x20000; Alignment = 0x1FFFF; Owner = PCI [D3|01|00:10]
Type = Mem64; Base = 0x8008100000; Length = 0x100; Alignment = 0xFFF
It would use 0x4100000 to calculate the root bus's PMem64 resource window.
While in Linux, kernel will use 0x1FFFFFF as the alignment to calculate
the PMem64 size, which would be 0x6000000. So kernel would try to
allocate 0x6000000 from the PMem64 resource window, but since the window
size is 0x4100000 as assigned by EDK2, the allocation would fail.The diffences could result in resource assignment failure.
Using _DSM #5 method to inform guest os not to ignore the PCI configuration that firmware has done at boot time could handle the differences.
--- hw/pci-host/gpex-acpi.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)
hw/pci-host/gpex-acpi.c +18 -2
@@ -112,10 +112,26 @@ static void acpi_dsdt_add_pci_osc(Aml *dev)UUID =aml_touuid ("E5C937D0-3553-4D7A-9117-EA4D19C3434D" ); ifctx =aml_if (aml_equal (aml_arg (0 ),UUID )); ifctx1 =aml_if (aml_equal (aml_arg (2 ),aml_int (0 ))); -uint8_t byte_list[1 ] = {1 }; - buf =aml_buffer (1 , byte_list); +uint8_t byte_list[] = { +0x1 <<0 /* support for functions other than function 0 */ | +0x1 <<5 /* support for function 5 */ + }; + buf =aml_buffer (ARRAY_SIZE (byte_list), byte_list);aml_append (ifctx1,aml_return (buf));aml_append (ifctx, ifctx1); + +/* +* PCI Firmware Specification 3.1 +* 4.6.5. _DSM for Ignoring PCI Boot Configurations +*/ +/* Arg2: Function Index: 5 */ + ifctx1 =aml_if (aml_equal (aml_arg (2 ),aml_int (5 ))); +/* +* 0 - The operating system must not ignore the PCI configuration that +* firmware has done at boot time. +*/ +aml_append (ifctx1,aml_return (aml_int (0 ))); +aml_append (ifctx, ifctx1);aml_append (method, ifctx); byte_list[0 ] =0 ;
Signature · 1 line
2.29.2
PATCH v4 5/8 acpi/gpex: Exclude pxb's resources from PCI0
In reply to Jiahui CenExclude the resources of extra root bridges from PCI0's _CRS. Otherwise, the resource windows would overlap in guest, and the IO resource window would fail to be registered.
--- hw/pci-host/gpex-acpi.c | 64 +++++++++++++------- 1 file changed, 43 insertions(+), 21 deletions(-)
hw/pci-host/gpex-acpi.c +43 -21
@@ -146,6 +146,8 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg)Aml *method, *crs, *dev, *rbuf;PCIBus *bus = cfg->bus;CrsRangeSet crs_range_set; +CrsRangeEntry *entry; +int i;/* start to construct the tables for pxb */ crs_range_set_init (&crs_range_set);
@@ -193,7 +195,6 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg)aml_append (scope, dev); } } -crs_range_set_free (&crs_range_set);/* tables for the main */ dev =aml_device ("%s" ,"PCI0" );
@@ -211,36 +212,55 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg)aml_append (method,aml_return (aml_int (cfg->ecam.base)));aml_append (dev, method); +/* +* At this point crs_range_set has all the ranges used by pci +* busses *other* than PCI0. These ranges will be excluded from +* the PCI0._CRS. +*/ rbuf =aml_resource_template ();aml_append (rbuf,aml_word_bus_number (AML_MIN_FIXED ,AML_MAX_FIXED ,AML_POS_DECODE ,0x0000 ,0x0000 , nr_pcie_buses -1 ,0x0000 , nr_pcie_buses));if (cfg->mmio32.size) { -aml_append (rbuf, -aml_dword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED , -AML_NON_CACHEABLE ,AML_READ_WRITE ,0x0000 , - cfg->mmio32.base, - cfg->mmio32.base + cfg->mmio32.size -1 , -0x0000 , - cfg->mmio32.size)); +crs_replace_with_free_ranges (crs_range_set.mem_ranges, + cfg->mmio32.base, + cfg->mmio32.base + cfg->mmio32.size -1 ); +for (i =0 ; i < crs_range_set.mem_ranges->len; i++) { + entry =g_ptr_array_index (crs_range_set.mem_ranges, i); +aml_append (rbuf, +aml_dword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED , +AML_NON_CACHEABLE ,AML_READ_WRITE ,0x0000 , + entry->base, entry->limit, +0x0000 , entry->limit - entry->base +1 )); + } }if (cfg->pio.size) { -aml_append (rbuf, -aml_dword_io (AML_MIN_FIXED ,AML_MAX_FIXED ,AML_POS_DECODE , -AML_ENTIRE_RANGE ,0x0000 ,0x0000 , - cfg->pio.size -1 , - cfg->pio.base, - cfg->pio.size)); +crs_replace_with_free_ranges (crs_range_set.io_ranges, +0x0000 , + cfg->pio.size -1 ); +for (i =0 ; i < crs_range_set.io_ranges->len; i++) { + entry =g_ptr_array_index (crs_range_set.io_ranges, i); +aml_append (rbuf, +aml_dword_io (AML_MIN_FIXED ,AML_MAX_FIXED ,AML_POS_DECODE , +AML_ENTIRE_RANGE ,0x0000 , entry->base, + entry->limit, cfg->pio.base, + entry->limit - entry->base +1 )); + } }if (cfg->mmio64.size) { -aml_append (rbuf, -aml_qword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED , -AML_NON_CACHEABLE ,AML_READ_WRITE ,0x0000 , - cfg->mmio64.base, - cfg->mmio64.base + cfg->mmio64.size -1 , -0x0000 , - cfg->mmio64.size)); +crs_replace_with_free_ranges (crs_range_set.mem_64bit_ranges, + cfg->mmio64.base, + cfg->mmio64.base + cfg->mmio64.size -1 ); +for (i =0 ; i < crs_range_set.mem_64bit_ranges->len; i++) { + entry =g_ptr_array_index (crs_range_set.mem_64bit_ranges, i); +aml_append (rbuf, +aml_qword_memory (AML_POS_DECODE ,AML_MIN_FIXED ,AML_MAX_FIXED , +AML_NON_CACHEABLE ,AML_READ_WRITE ,0x0000 , + entry->base, + entry->limit,0x0000 , + entry->limit - entry->base +1 )); + } }aml_append (dev,aml_name_decl ("_CRS" , rbuf));
@@ -259,4 +279,6 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg)aml_append (dev_res0,aml_name_decl ("_CRS" , crs));aml_append (dev, dev_res0);aml_append (scope, dev); + +crs_range_set_free (&crs_range_set); }
Signature · 1 line
2.29.2
PATCH v4 6/8 Kconfig: Compile PXB for ARM_VIRT
In reply to Jiahui CenPXB is now supported on ARM, so let's compile for arm_virt machine.
--- hw/pci-bridge/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-bridge/Kconfig +1 -1
@@ -5,7 +5,7 @@ config PCIE_PORT config PXB bool - default y if Q35 + default y if Q35 || ARM_VIRT config XIO3130 bool
Signature · 1 line
2.29.2
PATCH v4 7/8 acpi: Enable pxb unit-test for ARM virt machine
In reply to Jiahui CenNo matter whether the pxb is enabled or not, the CONFIG_PXB macro in test would keep undefined. And since pxb is now enabled for ARM Virt machine by default, let's enable pxb unit-test by removing the CONFIG_PXB.
--- tests/qtest/bios-tables-test.c | 4 ---- 1 file changed, 4 deletions(-)
tests/qtest/bios-tables-test.c +0 -4
@@ -1196,7 +1196,6 @@ static void test_acpi_virt_tcg_numamem(void) } -#ifdef CONFIG_PXBstatic void test_acpi_virt_tcg_pxb (void ) {test_data data = {
@@ -1228,7 +1227,6 @@ static void test_acpi_virt_tcg_pxb(void)free_test_data (&data); } -#endif static void test_acpi_tcg_acpi_hmat (const char *machine) {
@@ -1342,9 +1340,7 @@ int main(int argc, char *argv[])qtest_add_func ("acpi/virt" , test_acpi_virt_tcg);qtest_add_func ("acpi/virt/numamem" , test_acpi_virt_tcg_numamem);qtest_add_func ("acpi/virt/memhp" , test_acpi_virt_tcg_memhp); -#ifdef CONFIG_PXB qtest_add_func ("acpi/virt/pxb" , test_acpi_virt_tcg_pxb); -#endif } ret =g_test_run ();boot_sector_cleanup (disk);
Signature · 1 line
2.29.2
PATCH v4 8/8 acpi: Update _DSM method in expected files
In reply to Jiahui CenA new _DSM #5 method is added.
Update expected DSDT files accordingly, and re-enable their testing.
Full diff of changed files disassembly:
tmp/new/tests/data/acpi/microvm/DSDT.pcie.dsl 2021-01-07 17:36:16.706831080 +0800 renamed from tmp/old/tests/data/acpi/microvm/DSDT.pcie.dsl 2021-01-07 17:31:36.286831080 +0800 +8 -3
@@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x00000BCF (3023) + * Length 0x00000BD7 (3031) * Revision 0x02 - * Checksum 0x29 + * Checksum 0x99 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1)
@@ -1302,9 +1302,14 @@ { Return (Buffer (One) { - 0x01 // . + 0x21 // ! }) } + + If ((Arg2 == 0x05)) + { + Return (Zero) + } } Return (Buffer (One)
tmp/new/tests/data/acpi/virt/DSDT.dsl 2021-01-07 17:36:17.146831080 +0800 renamed from tmp/old/tests/data/acpi/virt/DSDT.dsl 2021-01-07 17:31:36.546831080 +0800 +8 -3
@@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x0000144C (5196) + * Length 0x00001454 (5204) * Revision 0x02 - * Checksum 0xF0 + * Checksum 0x60 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1)
@@ -1838,9 +1838,14 @@ { Return (Buffer (One) { - 0x01 // . + 0x21 // ! }) } + + If ((Arg2 == 0x05)) + { + Return (Zero) + } } Return (Buffer (One)
tmp/new/tests/data/acpi/virt/DSDT.memhp.dsl 2021-01-07 17:36:17.156831080 +0800 renamed from tmp/old/tests/data/acpi/virt/DSDT.memhp.dsl 2021-01-07 17:31:36.546831080 +0800 +8 -3
@@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x0000199D (6557) + * Length 0x000019A5 (6565) * Revision 0x02 - * Checksum 0x11 + * Checksum 0x90 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1)
@@ -1840,9 +1840,14 @@ { Return (Buffer (One) { - 0x01 // . + 0x21 // ! }) } + + If ((Arg2 == 0x05)) + { + Return (Zero) + } } Return (Buffer (One)
tmp/new/tests/data/acpi/virt/DSDT.numamem.dsl 2021-01-07 17:36:17.156831080 +0800 renamed from tmp/old/tests/data/acpi/virt/DSDT.numamem.dsl 2021-01-07 17:31:36.556831080 +0800 +8 -3
@@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x0000144C (5196) + * Length 0x00001454 (5204) * Revision 0x02 - * Checksum 0xF0 + * Checksum 0x60 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1)
@@ -1838,9 +1838,14 @@ { Return (Buffer (One) { - 0x01 // . + 0x21 // ! }) } + + If ((Arg2 == 0x05)) + { + Return (Zero) + } } Return (Buffer (One)
tmp/new/tests/data/acpi/virt/DSDT.pxb.dsl 2021-01-07 17:36:17.166831080 +0800 renamed from tmp/old/tests/data/acpi/virt/DSDT.pxb.dsl 2021-01-07 17:31:36.566831080 +0800 +14 -4
@@ -9,9 +9,9 @@ * * Original Table Header: * Signature "DSDT" - * Length 0x00001DF9 (7673) + * Length 0x00001E09 (7689) * Revision 0x02 - * Checksum 0x42 + * Checksum 0x30 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1)
@@ -1810,9 +1810,14 @@ { Return (Buffer (One) { - 0x01 // . + 0x21 // ! }) } + + If ((Arg2 == 0x05)) + { + Return (Zero) + } } Return (Buffer (One)
@@ -3025,9 +3030,14 @@ { Return (Buffer (One) { - 0x01 // . + 0x21 // ! }) } + + If ((Arg2 == 0x05)) + { + Return (Zero) + } } Return (Buffer (One)
--- tests/data/acpi/microvm/DSDT.pcie | Bin 3023 -> 3031 bytes tests/data/acpi/virt/DSDT | Bin 5196 -> 5204 bytes tests/data/acpi/virt/DSDT.memhp | Bin 6557 -> 6565 bytes tests/data/acpi/virt/DSDT.numamem | Bin 5196 -> 5204 bytes tests/data/acpi/virt/DSDT.pxb | Bin 7673 -> 7689 bytes tests/qtest/bios-tables-test-allowed-diff.h | 5 ----- 6 files changed, 5 deletions(-)
tests/data/acpi/microvm/DSDT.pcie binary +0 -0
tests/data/acpi/virt/DSDT binary +0 -0
tests/data/acpi/virt/DSDT.memhp binary +0 -0
tests/data/acpi/virt/DSDT.numamem binary +0 -0
tests/data/acpi/virt/DSDT.pxb binary +0 -0
tests/qtest/bios-tables-test-allowed-diff.h +0 -5
@@ -1,6 +1 @@/* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/microvm/DSDT.pcie" , -"tests/data/acpi/virt/DSDT" , -"tests/data/acpi/virt/DSDT.memhp" , -"tests/data/acpi/virt/DSDT.numamem" , -"tests/data/acpi/virt/DSDT.pxb",
Signature · 1 line
2.29.2
Kindly ping...
Thanks,
Jiahui
Quoted 47 lines · Jiahui Cen
This patch series adds some fixes for ARM virt machine pxb support.
1. Pass addr offset for IO, MMIO and bus number when builing crs, because theaddr_transis needed to describe an addr resource. [1]
2. Inform guest os not to ignore the resource map generated by firmware as the x86 default way. [2]
3. Enable pxb for ARM virt machine by default.
4. Update expected DSDT files with the above changes and enable the pxb unit-test.
v3->v4:
* Separate the patch of ordering root buses for further discussion. [3]
v2->v3:
* Reorder the root bridges.
* Exclude resources of extra root bridges from main root bridge's_CRS.
v1->v2:
* Update expected DSDT files.
* Quote PCI Firmware spec as comments.[1]: https://lore.kernel.org/qemu-devel/[email protected]/
[2]: https://lore.kernel.org/qemu-devel/[email protected]/
[3]: https://lore.kernel.org/qemu-devel/[email protected]/Jiahui Cen (8):
acpi: Allow DSDT acpi table changes
acpi: Fix unmatched expected DSDT.pxb file
acpi: Add addr offset inbuild_crsacpi/gpex: Inform os to keep firmware resource map acpi/gpex: Exclude pxb's resources from PCI0
Kconfig: Compile PXB forARM_VIRT
acpi: Enable pxb unit-test for ARM virt machine
acpi: Update_DSMmethod in expected fileshw/acpi/aml-build.c | 18 ++-- hw/i386/acpi-build.c | 3 +- hw/pci-bridge/Kconfig | 2 +- hw/pci-host/gpex-acpi.c | 87 ++++++++++++++------ include/hw/acpi/aml-build.h | 4 +- tests/data/acpi/microvm/DSDT.pcie | Bin 3023 -> 3031 bytes tests/data/acpi/virt/DSDT | Bin 5196 -> 5204 bytes tests/data/acpi/virt/DSDT.memhp | Bin 6557 -> 6565 bytes tests/data/acpi/virt/DSDT.numamem | Bin 5196 -> 5204 bytes tests/data/acpi/virt/DSDT.pxb | Bin 7802 -> 7689 bytes tests/qtest/bios-tables-test.c | 4 - 11 files changed, 79 insertions(+), 39 deletions(-)
Looks good to me. Igor, want to ack before I apply this?
Quoted 53 lines · Jiahui Cen
Kindly ping...
Thanks,
JiahuiQuoted 47 lines · Jiahui Cen
This patch series adds some fixes for ARM virt machine pxb support.
1. Pass addr offset for IO, MMIO and bus number when builing crs, because theaddr_transis needed to describe an addr resource. [1]
2. Inform guest os not to ignore the resource map generated by firmware as the x86 default way. [2]
3. Enable pxb for ARM virt machine by default.
4. Update expected DSDT files with the above changes and enable the pxb unit-test.
v3->v4:
* Separate the patch of ordering root buses for further discussion. [3]
v2->v3:
* Reorder the root bridges.
* Exclude resources of extra root bridges from main root bridge's_CRS.
v1->v2:
* Update expected DSDT files.
* Quote PCI Firmware spec as comments.[1]: https://lore.kernel.org/qemu-devel/[email protected]/
[2]: https://lore.kernel.org/qemu-devel/[email protected]/
[3]: https://lore.kernel.org/qemu-devel/[email protected]/Jiahui Cen (8):
acpi: Allow DSDT acpi table changes
acpi: Fix unmatched expected DSDT.pxb file
acpi: Add addr offset inbuild_crsacpi/gpex: Inform os to keep firmware resource map acpi/gpex: Exclude pxb's resources from PCI0
Kconfig: Compile PXB forARM_VIRT
acpi: Enable pxb unit-test for ARM virt machine
acpi: Update_DSMmethod in expected fileshw/acpi/aml-build.c | 18 ++-- hw/i386/acpi-build.c | 3 +- hw/pci-bridge/Kconfig | 2 +- hw/pci-host/gpex-acpi.c | 87 ++++++++++++++------ include/hw/acpi/aml-build.h | 4 +- tests/data/acpi/microvm/DSDT.pcie | Bin 3023 -> 3031 bytes tests/data/acpi/virt/DSDT | Bin 5196 -> 5204 bytes tests/data/acpi/virt/DSDT.memhp | Bin 6557 -> 6565 bytes tests/data/acpi/virt/DSDT.numamem | Bin 5196 -> 5204 bytes tests/data/acpi/virt/DSDT.pxb | Bin 7802 -> 7689 bytes tests/qtest/bios-tables-test.c | 4 - 11 files changed, 79 insertions(+), 39 deletions(-)
Igor Mammedov
Acked-byQuoted 1 line · On Tue, 12 Jan 2021 05:37:29 -0500 "Michael S. Tsirkin" <[email protected]> wrote:
Looks good to me. Igor, want to ack before I apply this?
Looks good to me too, so
Quoted 57 lines · Jiahui Cen
Quoted 53 lines
Kindly ping...
Thanks,
JiahuiQuoted 47 lines · Jiahui Cen
This patch series adds some fixes for ARM virt machine pxb support.
1. Pass addr offset for IO, MMIO and bus number when builing crs, because theaddr_transis needed to describe an addr resource. [1]
2. Inform guest os not to ignore the resource map generated by firmware as the x86 default way. [2]
3. Enable pxb for ARM virt machine by default.
4. Update expected DSDT files with the above changes and enable the pxb unit-test.
v3->v4:
* Separate the patch of ordering root buses for further discussion. [3]
v2->v3:
* Reorder the root bridges.
* Exclude resources of extra root bridges from main root bridge's_CRS.
v1->v2:
* Update expected DSDT files.
* Quote PCI Firmware spec as comments.[1]: https://lore.kernel.org/qemu-devel/[email protected]/
[2]: https://lore.kernel.org/qemu-devel/[email protected]/
[3]: https://lore.kernel.org/qemu-devel/[email protected]/Jiahui Cen (8):
acpi: Allow DSDT acpi table changes
acpi: Fix unmatched expected DSDT.pxb file
acpi: Add addr offset inbuild_crsacpi/gpex: Inform os to keep firmware resource map acpi/gpex: Exclude pxb's resources from PCI0
Kconfig: Compile PXB forARM_VIRT
acpi: Enable pxb unit-test for ARM virt machine
acpi: Update_DSMmethod in expected fileshw/acpi/aml-build.c | 18 ++-- hw/i386/acpi-build.c | 3 +- hw/pci-bridge/Kconfig | 2 +- hw/pci-host/gpex-acpi.c | 87 ++++++++++++++------ include/hw/acpi/aml-build.h | 4 +- tests/data/acpi/microvm/DSDT.pcie | Bin 3023 -> 3031 bytes tests/data/acpi/virt/DSDT | Bin 5196 -> 5204 bytes tests/data/acpi/virt/DSDT.memhp | Bin 6557 -> 6565 bytes tests/data/acpi/virt/DSDT.numamem | Bin 5196 -> 5204 bytes tests/data/acpi/virt/DSDT.pxb | Bin 7802 -> 7689 bytes tests/qtest/bios-tables-test.c | 4 - 11 files changed, 79 insertions(+), 39 deletions(-)