From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Given this is a new configuration, there are affects on APIC, CEDT
and DSDT, but the key elements are in SRAT (plus related data in
HMAT). The configuration has node to exercise many different combinations.
0) CPUs + Memory
1) GI only
2) GP only
3) CPUS only
4) Memory only
5) CPUs + HP memory
GI node, GP Node, Memory only node, hotplug memory
only node, latency and bandwidth such that in Linux Access0
(any initiator) and Access1 (CPU initiators only) given different
answers. Following cropped to remove details of each entry.
[000h 0000 004h] Signature : "SRAT" [System Resource Affinity Table]
[030h 0048 001h] Subtable Type : 00 [Processor Local APIC/SAPIC Affinity]
[032h 0050 001h] Proximity Domain Low(8) : 00
[033h 0051 001h] Apic ID : 00
[040h 0064 001h] Subtable Type : 00 [Processor Local APIC/SAPIC Affinity]
[042h 0066 001h] Proximity Domain Low(8) : 03 [043h 0067 001h] Apic ID : 01
[050h 0080 001h] Subtable Type : 00 [Processor Local APIC/SAPIC Affinity]
[052h 0082 001h] Proximity Domain Low(8) : 05
[053h 0083 001h] Apic ID : 02
[060h 0096 001h] Subtable Type : 01 [Memory Affinity]
[062h 0098 004h] Proximity Domain : 00000000
[068h 0104 008h] Base Address : 0000000000000000
[070h 0112 008h] Address Length : 00000000000A0000
[088h 0136 001h] Subtable Type : 01 [Memory Affinity]
[08Ah 0138 004h] Proximity Domain : 00000000
[090h 0144 008h] Base Address : 0000000000100000
[098h 0152 008h] Address Length : 0000000003F00000
[0A8h 0168 008h] Reserved3 : 0000000000000000
[0B0h 0176 001h] Subtable Type : 01 [Memory Affinity]
[0B2h 0178 004h] Proximity Domain : 00000004
[0B8h 0184 008h] Base Address : 0000000004000000
[0C0h 0192 008h] Address Length : 0000000004000000
//Comment in hw/i386/aml-build.c on why these exist - not part of
//ACPI requirements.
[0D8h 0216 001h] Subtable Type : 01 [Memory Affinity]
[0DAh 0218 004h] Proximity Domain : 00000000
[0E0h 0224 008h] Base Address : 0000000000000000
[0E8h 0232 008h] Address Length : 0000000000000000
[100h 0256 001h] Subtable Type : 01 [Memory Affinity]
[102h 0258 004h] Proximity Domain : 00000000
[108h 0264 008h] Base Address : 0000000000000000
[110h 0272 008h] Address Length : 0000000000000000
[128h 0296 001h] Subtable Type : 01 [Memory Affinity]
[12Ah 0298 004h] Proximity Domain : 00000000
[130h 0304 008h] Base Address : 0000000000000000
[138h 0312 008h] Address Length : 0000000000000000
[150h 0336 001h] Subtable Type : 01 [Memory Affinity]
[152h 0338 004h] Proximity Domain : 00000000
[158h 0344 008h] Base Address : 0000000000000000
[160h 0352 008h] Address Length : 0000000000000000
[178h 0376 001h] Subtable Type : 01 [Memory Affinity]
[17Ah 0378 004h] Proximity Domain : 00000000
[180h 0384 008h] Base Address : 0000000000000000
[188h 0392 008h] Address Length : 0000000000000000
// End of strange empty Memory Affinity structures.
[1A0h 0416 001h] Subtable Type : 05 [Generic Initiator Affinity]
[1A3h 0419 001h] Device Handle Type : 01
[1A4h 0420 004h] Proximity Domain : 00000001
[1A8h 0424 010h] Device Handle : 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00
[1C0h 0448 001h] Subtable Type : 06 [Generic Port Affinity]
[1C3h 0451 001h] Device Handle Type : 00
[1C4h 0452 004h] Proximity Domain : 00000002
[1C8h 0456 010h] Device Handle : 41 43 50 49 30 30 31 36 40 00 00 00 00 00 00 00
[1E0h 0480 001h] Subtable Type : 01 [Memory Affinity]
[1E2h 0482 004h] Proximity Domain : 00000005
[1E8h 0488 008h] Base Address : 0000000100000000
[1F0h 0496 008h] Address Length : 0000000090000000
[1FCh 0508 004h] Flags (decoded below) : 00000003
Enabled : 1
Hot Pluggable : 1
Non-Volatile : 0
Example block from HMAT:
[0F0h 0240 002h] Structure Type : 0001 [System Locality Latency and Bandwidth Information] [0F2h 0242 002h] Reserved : 0000 [0F4h 0244 004h] Length : 00000078 [0F8h 0248 001h] Flags (decoded below) : 00 Memory Hierarchy : 0 Use Minimum Transfer Size : 0 Non-sequential Transfers : 0
[0F9h 0249 001h] Data Type : 03
[0FAh 0250 001h] Minimum Transfer Size : 00
[0FBh 0251 001h] Reserved1 : 00
[0FCh 0252 004h] Initiator Proximity Domains # : 00000004
[100h 0256 004h] Target Proximity Domains # : 00000006
[104h 0260 004h] Reserved2 : 00000000
[108h 0264 008h] Entry Base Unit : 0000000000000004
[110h 0272 004h] Initiator Proximity Domain List : 00000000
[114h 0276 004h] Initiator Proximity Domain List : 00000001
[118h 0280 004h] Initiator Proximity Domain List : 00000003
[11Ch 0284 004h] Initiator Proximity Domain List : 00000005
[120h 0288 004h] Target Proximity Domain List : 00000000
[124h 0292 004h] Target Proximity Domain List : 00000001
[128h 0296 004h] Target Proximity Domain List : 00000002
[12Ch 0300 004h] Target Proximity Domain List : 00000003
[130h 0304 004h] Target Proximity Domain List : 00000004
[134h 0308 004h] Target Proximity Domain List : 00000005
[138h 0312 002h] Entry : 00C8
[13Ah 0314 002h] Entry : 0000
[13Ch 0316 002h] Entry : 0032
[13Eh 0318 002h] Entry : 0000
[140h 0320 002h] Entry : 0032
[142h 0322 002h] Entry : 0064
[144h 0324 002h] Entry : 0019
[146h 0326 002h] Entry : 0000
[148h 0328 002h] Entry : 0064
[14Ah 0330 002h] Entry : 0000
[14Ch 0332 002h] Entry : 00C8
[14Eh 0334 002h] Entry : 0019
[150h 0336 002h] Entry : 0064
[152h 0338 002h] Entry : 0000
[154h 0340 002h] Entry : 0032
[156h 0342 002h] Entry : 0000
[158h 0344 002h] Entry : 0032
[15Ah 0346 002h] Entry : 0064
[15Ch 0348 002h] Entry : 0064
[15Eh 0350 002h] Entry : 0000
[160h 0352 002h] Entry : 0032
[162h 0354 002h] Entry : 0000
[164h 0356 002h] Entry : 0032
[166h 0358 002h] Entry : 00C8
Note the zeros represent entries where the target node has no
memory. These could be surpressed but it isn't 'wrong' to provide
them and it is (probably) permissible under ACPI to hotplug memory
into these nodes later.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240524100507.32106-7-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/qtest/bios-tables-test-allowed-diff.h | 5 -----
tests/data/acpi/q35/APIC.acpihmat-generic-x | Bin 0 -> 136 bytes
tests/data/acpi/q35/CEDT.acpihmat-generic-x | Bin 0 -> 68 bytes
tests/data/acpi/q35/DSDT.acpihmat-generic-x | Bin 0 -> 10400 bytes
tests/data/acpi/q35/HMAT.acpihmat-generic-x | Bin 0 -> 360 bytes
tests/data/acpi/q35/SRAT.acpihmat-generic-x | Bin 0 -> 520 bytes
6 files changed, 5 deletions(-)
diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index a5aa801c99..dfb8523c8b 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1,6 +1 @@
/* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/q35/APIC.acpihmat-generic-x",
-"tests/data/acpi/q35/CEDT.acpihmat-generic-x",
-"tests/data/acpi/q35/DSDT.acpihmat-generic-x",
-"tests/data/acpi/q35/HMAT.acpihmat-generic-x",
-"tests/data/acpi/q35/SRAT.acpihmat-generic-x",
diff --git a/tests/data/acpi/q35/APIC.acpihmat-generic-x b/tests/data/acpi/q35/APIC.acpihmat-generic-x
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..317ddb3fbed94e4f49a87976fdc7f23b1a6c3fdc 100644
GIT binary patch
literal 136
zcmXxb%Mn0O3`XITcnlXkq!sRl6*D%L%2Ae5RD#JhHu=utPrpp@0J43U<G9+eEz!(O
p0B;wrJ6XY}$fv3+t#8iTuLjWcqk*CTI<LC^D}=wACRJWOATL<W3;_TD
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/q35/CEDT.acpihmat-generic-x b/tests/data/acpi/q35/CEDT.acpihmat-generic-x
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..31c9011663639b4a0f4816f3b2b06398f94682f7 100644
GIT binary patch
literal 68
zcmZ>EbqR4{U|?Xhb@F%i2v%^42yj+VP*7lGU|;~TK{Nw{0)qoc4VVoE6CiAe2mn)-
B2LS*8
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/q35/DSDT.acpihmat-generic-x b/tests/data/acpi/q35/DSDT.acpihmat-generic-x
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a04451374d1b95764d34fbda1ec791a89ffdcc46 100644
GIT binary patch
literal 10400
zcmcJVO>7%UcE?}wLuwXVQj=<ZSe7lqGn1L@Ze}R?V-`s^W3rnfDY2<Go3b@%18jXb
zk?aYk;~58|F$_pDu&dP}$qd(v<VFv;o4sugL2f||B!}c?AP6!*fB-q<vd1ifb%0<P
zyy|YM9z_A`Lv*03Ue*7-`c-$=>yI)Wv)OqEfYpm@M#ae$H*6!9%jFmVU>W~w)x=$J
z56oh@#nQ0^a}U#^Y!=H!MgNXjTraaf-}Qd%d7u8kW1Bu~eWg9y+Vr0uds~2=9&P!Y
zV?kS;Y&pf2dsLmUjcQ(LRjQ_1c*zx|Wdx<T(ps;Ypw~uQYmSjPc>soaXR%XHws$j=
zTyw2|yZWnz`I|q!^J(G5_x|<wPag1uVcuCfdB7FJymQsZAMdfpFMA#B%l007f^yNe
z*qQvYEt&(HhAqB_mgj0<LRX932l{HVWIEPZ=SKTJ_?b8ZuQT^$Fo2iu|I>du*FU$u
znE8cu;qMKr>vcw-?eSRG^ZDVi2hjC8^X>b5)XyekFb1Cg^!OuyO@A|JbdSDkHVTFy
zAG7Or-pDV4(lQ!OW`WQDU<N?NDaXIR>h*em7nZes&}#a-IC(g6?tyJMO_qM4a>YH=
zuwvLobv<VrRWs)vIHi>qOaG(F6YgOeD@HM2TFJQw#k$pC>6d{FD@L)tZsqK%xsh{O
zv1Y7-{+4Z&R$}fOSnKutUF_lSvpql`?%QbYg8uD7)!Z1?3w`<c<Ar@ay_mAae3~P#
zHKDNSV-PWcPme!hu+^FS@=1FO+FNR`*XzNPO}6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jax<hG4RJ!
zAZIsjm9V^wKV|%>DDKg<)uP#omfm<gnA`Blb(T++nFk&)R%Sb}1B_jX0Uok9t+n;O
zYGRV86rQ|-`^Ma(rJCJbjC?188$U++YJ9BBK8t@ASClIU!t;``X7x2mCi24&&8zsU
zI4D;%p?Ry(H2R}Shj);|wGTcp<q9wy&V;jE2#-t*rxFdt&=7|O&{Vvq)kj*T{384x
DTa5vi
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/q35/HMAT.acpihmat-generic-x b/tests/data/acpi/q35/HMAT.acpihmat-generic-x
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0e5765f6ee4c07638c70647ae145e968718b67cd 100644
GIT binary patch
literal 360
zcma)$u?oU46h%)`E5*sdrCT<g^9Qy|7pb6wAJD;1aP;%?S#r}?8U(=$A@?0_a^G+{
z-=7Zr*p2;g3*F<|hY*4T<aIAP0p<Kl%1LivWByzE=Veftt@-_NO)66XwIR*knBIts
t?eaMgjn%}QYk&q{c(?Xe^KMITx#vH<336X#q6H=((dJuwh>OiW@d0Cl4*>uG
literal 0
HcmV?d00001
diff --git a/tests/data/acpi/q35/SRAT.acpihmat-generic-x b/tests/data/acpi/q35/SRAT.acpihmat-generic-x
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..cbf45a31ba6d2c06f2bb0e203d4b40100522ac08 100644
GIT binary patch
literal 520
zcmWFzatz^MVqjoQbMklg2v%^42yj+VP*7lGU|;~TK{N=%fdD$6nGsc<l?j>8r~%gr
z1za!&in$1N0#Nx6%rJ$h=CQzpVGJ0JrVgeIKS0=v9}JW_Rs{xV_`<>k0$^dnroh0!
i#K6Gd=p5i_U|?wGfF{qV!3y^nRL=yM06c&h7#IL5atr|g
literal 0
HcmV?d00001
--
MST
On 6/4/24 14:08, Michael S. Tsirkin wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > Given this is a new configuration, there are affects on APIC, CEDT > and DSDT, but the key elements are in SRAT (plus related data in > HMAT). The configuration has node to exercise many different combinations. > > 0) CPUs + Memory > 1) GI only > 2) GP only > 3) CPUS only > 4) Memory only > 5) CPUs + HP memory > > GI node, GP Node, Memory only node, hotplug memory > only node, latency and bandwidth such that in Linux Access0 > (any initiator) and Access1 (CPU initiators only) given different > answers. Following cropped to remove details of each entry. This fails testing: https://gitlab.com/qemu-project/qemu/-/jobs/7021105504 acpi-test: Warning! SRAT binary file mismatch. Actual [aml:/tmp/aml-GHR6O2], Expected [aml:tests/data/acpi/q35/SRAT.acpihmat-generic-x]. See source file tests/qtest/bios-tables-test.c for instructions on how to update expected files. to see ASL diff between mismatched files install IASL, rebuild QEMU from scratch and re-run tests with V=1 environment variable set** ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion failed: (all_tables_match) Bail out! ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion failed: (all_tables_match) Aborted (core dumped) r~
On Wed, 5 Jun 2024 07:39:53 -0700 Richard Henderson <richard.henderson@linaro.org> wrote: > On 6/4/24 14:08, Michael S. Tsirkin wrote: > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > Given this is a new configuration, there are affects on APIC, CEDT > > and DSDT, but the key elements are in SRAT (plus related data in > > HMAT). The configuration has node to exercise many different combinations. > > > > 0) CPUs + Memory > > 1) GI only > > 2) GP only > > 3) CPUS only > > 4) Memory only > > 5) CPUs + HP memory > > > > GI node, GP Node, Memory only node, hotplug memory > > only node, latency and bandwidth such that in Linux Access0 > > (any initiator) and Access1 (CPU initiators only) given different > > answers. Following cropped to remove details of each entry. > > > This fails testing: > > https://gitlab.com/qemu-project/qemu/-/jobs/7021105504 > > acpi-test: Warning! SRAT binary file mismatch. Actual [aml:/tmp/aml-GHR6O2], Expected > [aml:tests/data/acpi/q35/SRAT.acpihmat-generic-x]. > See source file tests/qtest/bios-tables-test.c for instructions on how to update expected > files. > to see ASL diff between mismatched files install IASL, rebuild QEMU from scratch and > re-run tests with V=1 environment variable set** > ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion failed: > (all_tables_match) > Bail out! ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion failed: > (all_tables_match) > Aborted (core dumped) > s390 and passes on an x86 host, so I guess an endian bug - any chance of a table dump from someone with access to an s390 host? This test covers some stuff that was previously missing tests so may be non trivial to spot. I'll play guess in the meantime. So far I'm not seeing anything that differs from existing ACPI table building code. Jonathan > > r~
On 6/5/24 10:27, Jonathan Cameron wrote: >> This fails testing: >> >> https://gitlab.com/qemu-project/qemu/-/jobs/7021105504 >> >> acpi-test: Warning! SRAT binary file mismatch. Actual [aml:/tmp/aml-GHR6O2], Expected >> [aml:tests/data/acpi/q35/SRAT.acpihmat-generic-x]. >> See source file tests/qtest/bios-tables-test.c for instructions on how to update expected >> files. >> to see ASL diff between mismatched files install IASL, rebuild QEMU from scratch and >> re-run tests with V=1 environment variable set** >> ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion failed: >> (all_tables_match) >> Bail out! ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion failed: >> (all_tables_match) >> Aborted (core dumped) >> > > s390 and passes on an x86 host, so I guess an endian bug - any chance of a table dump > from someone with access to an s390 host? Sure. By what incantation do I produce a dump? r~
On Wed, 5 Jun 2024 09:01:37 -0700 Richard Henderson <richard.henderson@linaro.org> wrote: > On 6/5/24 10:27, Jonathan Cameron wrote: > >> This fails testing: > >> > >> https://gitlab.com/qemu-project/qemu/-/jobs/7021105504 > >> > >> acpi-test: Warning! SRAT binary file mismatch. Actual [aml:/tmp/aml-GHR6O2], Expected > >> [aml:tests/data/acpi/q35/SRAT.acpihmat-generic-x]. > >> See source file tests/qtest/bios-tables-test.c for instructions on how to update expected > >> files. > >> to see ASL diff between mismatched files install IASL, rebuild QEMU from scratch and > >> re-run tests with V=1 environment variable set** > >> ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion failed: > >> (all_tables_match) > >> Bail out! ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion failed: > >> (all_tables_match) > >> Aborted (core dumped) > >> > > > > s390 and passes on an x86 host, so I guess an endian bug - any chance of a table dump > > from someone with access to an s390 host? > > Sure. By what incantation do I produce a dump? If you still have the /mnt/aml-GHR602 above then either upload that somewhere or iasl -d /mnt/aml-GHR602 should generate you a suitable text file. However generic ports are fairly recent so you may need a newer iasl from acpica-tools to decode. It will moan if it doesn't understand the content. Jonathan > > > r~
On Wed, 5 Jun 2024 17:08:45 +0100 Jonathan Cameron <Jonathan.Cameron@huawei.com> wrote: > On Wed, 5 Jun 2024 09:01:37 -0700 > Richard Henderson <richard.henderson@linaro.org> wrote: > > > On 6/5/24 10:27, Jonathan Cameron wrote: > > >> This fails testing: > > >> > > >> https://gitlab.com/qemu-project/qemu/-/jobs/7021105504 > > >> > > >> acpi-test: Warning! SRAT binary file mismatch. Actual [aml:/tmp/aml-GHR6O2], Expected > > >> [aml:tests/data/acpi/q35/SRAT.acpihmat-generic-x]. > > >> See source file tests/qtest/bios-tables-test.c for instructions on how to update expected > > >> files. > > >> to see ASL diff between mismatched files install IASL, rebuild QEMU from scratch and > > >> re-run tests with V=1 environment variable set** > > >> ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion failed: > > >> (all_tables_match) > > >> Bail out! ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion failed: > > >> (all_tables_match) > > >> Aborted (core dumped) > > >> > > > > > > s390 and passes on an x86 host, so I guess an endian bug - any chance of a table dump > > > from someone with access to an s390 host? > > > > Sure. By what incantation do I produce a dump? > > If you still have the /mnt/aml-GHR602 above then either upload that somewhere or > iasl -d /mnt/aml-GHR602 > should generate you a suitable text file. However generic ports are fairly recent > so you may need a newer iasl from acpica-tools to decode. > It will moan if it doesn't understand the content. > make check-qtest-x86_64 is how I get the test to run in the first place. Alternatively, this 'might' be sufficient if my guess for the problem is correct. Thanks! From 956df037f024783f19b6b00e5e280484380227a0 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron <Jonathan.Cameron@huawei.com> Date: Wed, 5 Jun 2024 17:01:36 +0100 Subject: [PATCH] hw/acpi: Fix big endian host creation of Generic Port Affinity Structures Treating the HID as an integer caused it to get bit reversed on big endian hosts running little endian guests. Treat it as a character array instead. Fixes hw/acpi: Generic Port Affinity Structure Support Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> --- Maybe this is the only problem? I don't have a setup to test so any help would be appreciated. --- include/hw/acpi/acpi_generic_initiator.h | 2 +- hw/acpi/acpi_generic_initiator.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/hw/acpi/acpi_generic_initiator.h b/include/hw/acpi/acpi_generic_initiator.h index 1a899af30f..5baefda33a 100644 --- a/include/hw/acpi/acpi_generic_initiator.h +++ b/include/hw/acpi/acpi_generic_initiator.h @@ -61,7 +61,7 @@ typedef struct PCIDeviceHandle { uint16_t bdf; }; struct { - uint64_t hid; + char hid[8]; uint32_t uid; }; }; diff --git a/hw/acpi/acpi_generic_initiator.c b/hw/acpi/acpi_generic_initiator.c index 78b80dcf08..c2fb5ab2ef 100644 --- a/hw/acpi/acpi_generic_initiator.c +++ b/hw/acpi/acpi_generic_initiator.c @@ -150,8 +150,12 @@ build_srat_generic_node_affinity(GArray *table_data, int node, build_append_int_noprefix(table_data, handle->bdf, 2); build_append_int_noprefix(table_data, 0, 12); } else { + int i; + /* Device Handle - ACPI */ - build_append_int_noprefix(table_data, handle->hid, 8); + for (i = 0; i < sizeof(handle->hid); i++) { + build_append_int_noprefix(table_data, handle->hid[i], 1); + } build_append_int_noprefix(table_data, handle->uid, 4); build_append_int_noprefix(table_data, 0, 4); } -- 2.39.2 > Jonathan > > > > > > > r~ >
On 6/5/24 11:11, Jonathan Cameron wrote: >>> Sure. By what incantation do I produce a dump? >> >> If you still have the /mnt/aml-GHR602 above then either upload that somewhere or >> iasl -d /mnt/aml-GHR602 >> should generate you a suitable text file. However generic ports are fairly recent >> so you may need a newer iasl from acpica-tools to decode. >> It will moan if it doesn't understand the content. >> > make check-qtest-x86_64 is how I get the test to run in the first place. Ah, I see, the file is not cleaned up on abort. For the record, I attach the dump. > Alternatively, this 'might' be sufficient if my guess for the problem > is correct. Thanks! > > From 956df037f024783f19b6b00e5e280484380227a0 Mon Sep 17 00:00:00 2001 > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Date: Wed, 5 Jun 2024 17:01:36 +0100 > Subject: [PATCH] hw/acpi: Fix big endian host creation of Generic Port > Affinity Structures > > Treating the HID as an integer caused it to get bit reversed > on big endian hosts running little endian guests. Treat it > as a character array instead. > > Fixes hw/acpi: Generic Port Affinity Structure Support > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > --- > Maybe this is the only problem? I don't have a setup to test > so any help would be appreciated. > --- > include/hw/acpi/acpi_generic_initiator.h | 2 +- > hw/acpi/acpi_generic_initiator.c | 6 +++++- > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/include/hw/acpi/acpi_generic_initiator.h b/include/hw/acpi/acpi_generic_initiator.h > index 1a899af30f..5baefda33a 100644 > --- a/include/hw/acpi/acpi_generic_initiator.h > +++ b/include/hw/acpi/acpi_generic_initiator.h > @@ -61,7 +61,7 @@ typedef struct PCIDeviceHandle { > uint16_t bdf; > }; > struct { > - uint64_t hid; > + char hid[8]; > uint32_t uid; > }; > }; > diff --git a/hw/acpi/acpi_generic_initiator.c b/hw/acpi/acpi_generic_initiator.c > index 78b80dcf08..c2fb5ab2ef 100644 > --- a/hw/acpi/acpi_generic_initiator.c > +++ b/hw/acpi/acpi_generic_initiator.c > @@ -150,8 +150,12 @@ build_srat_generic_node_affinity(GArray *table_data, int node, > build_append_int_noprefix(table_data, handle->bdf, 2); > build_append_int_noprefix(table_data, 0, 12); > } else { > + int i; > + > /* Device Handle - ACPI */ > - build_append_int_noprefix(table_data, handle->hid, 8); > + for (i = 0; i < sizeof(handle->hid); i++) { > + build_append_int_noprefix(table_data, handle->hid[i], 1); > + } > build_append_int_noprefix(table_data, handle->uid, 4); > build_append_int_noprefix(table_data, 0, 4); > } Yes, this fixes the abort. Merge the declaration of i into the for loop? r~
On Wed, 5 Jun 2024 09:54:16 -0700 Richard Henderson <richard.henderson@linaro.org> wrote: > On 6/5/24 11:11, Jonathan Cameron wrote: > >>> Sure. By what incantation do I produce a dump? > >> > >> If you still have the /mnt/aml-GHR602 above then either upload that somewhere or > >> iasl -d /mnt/aml-GHR602 > >> should generate you a suitable text file. However generic ports are fairly recent > >> so you may need a newer iasl from acpica-tools to decode. > >> It will moan if it doesn't understand the content. > >> > > make check-qtest-x86_64 is how I get the test to run in the first place. > > Ah, I see, the file is not cleaned up on abort. Yes. End up with a lot of those after a while! > For the record, I attach the dump. Thanks! > > > Alternatively, this 'might' be sufficient if my guess for the problem > > is correct. Thanks! > > > > From 956df037f024783f19b6b00e5e280484380227a0 Mon Sep 17 00:00:00 2001 > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > Date: Wed, 5 Jun 2024 17:01:36 +0100 > > Subject: [PATCH] hw/acpi: Fix big endian host creation of Generic Port > > Affinity Structures > > > > Treating the HID as an integer caused it to get bit reversed > > on big endian hosts running little endian guests. Treat it > > as a character array instead. > > > > Fixes hw/acpi: Generic Port Affinity Structure Support > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > --- > > Maybe this is the only problem? I don't have a setup to test > > so any help would be appreciated. > > --- > > include/hw/acpi/acpi_generic_initiator.h | 2 +- > > hw/acpi/acpi_generic_initiator.c | 6 +++++- > > 2 files changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/include/hw/acpi/acpi_generic_initiator.h b/include/hw/acpi/acpi_generic_initiator.h > > index 1a899af30f..5baefda33a 100644 > > --- a/include/hw/acpi/acpi_generic_initiator.h > > +++ b/include/hw/acpi/acpi_generic_initiator.h > > @@ -61,7 +61,7 @@ typedef struct PCIDeviceHandle { > > uint16_t bdf; > > }; > > struct { > > - uint64_t hid; > > + char hid[8]; > > uint32_t uid; > > }; > > }; > > diff --git a/hw/acpi/acpi_generic_initiator.c b/hw/acpi/acpi_generic_initiator.c > > index 78b80dcf08..c2fb5ab2ef 100644 > > --- a/hw/acpi/acpi_generic_initiator.c > > +++ b/hw/acpi/acpi_generic_initiator.c > > @@ -150,8 +150,12 @@ build_srat_generic_node_affinity(GArray *table_data, int node, > > build_append_int_noprefix(table_data, handle->bdf, 2); > > build_append_int_noprefix(table_data, 0, 12); > > } else { > > + int i; > > + > > /* Device Handle - ACPI */ > > - build_append_int_noprefix(table_data, handle->hid, 8); > > + for (i = 0; i < sizeof(handle->hid); i++) { > > + build_append_int_noprefix(table_data, handle->hid[i], 1); > > + } > > build_append_int_noprefix(table_data, handle->uid, 4); > > build_append_int_noprefix(table_data, 0, 4); > > } > > Yes, this fixes the abort. > Merge the declaration of i into the for loop? sure. Thanks for testing. Seems it's time I tried to get an emulated s390 setup running if that's practical as two of these in the last year :( Jonathan > > > r~
On Wed, 5 Jun 2024 16:27:33 +0100 Jonathan Cameron via <qemu-devel@nongnu.org> wrote: > On Wed, 5 Jun 2024 07:39:53 -0700 > Richard Henderson <richard.henderson@linaro.org> wrote: > > > On 6/4/24 14:08, Michael S. Tsirkin wrote: > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > > > Given this is a new configuration, there are affects on APIC, CEDT > > > and DSDT, but the key elements are in SRAT (plus related data in > > > HMAT). The configuration has node to exercise many different combinations. > > > > > > 0) CPUs + Memory > > > 1) GI only > > > 2) GP only > > > 3) CPUS only > > > 4) Memory only > > > 5) CPUs + HP memory > > > > > > GI node, GP Node, Memory only node, hotplug memory > > > only node, latency and bandwidth such that in Linux Access0 > > > (any initiator) and Access1 (CPU initiators only) given different > > > answers. Following cropped to remove details of each entry. > > > > > > This fails testing: > > > > https://gitlab.com/qemu-project/qemu/-/jobs/7021105504 > > > > acpi-test: Warning! SRAT binary file mismatch. Actual [aml:/tmp/aml-GHR6O2], Expected > > [aml:tests/data/acpi/q35/SRAT.acpihmat-generic-x]. > > See source file tests/qtest/bios-tables-test.c for instructions on how to update expected > > files. > > to see ASL diff between mismatched files install IASL, rebuild QEMU from scratch and > > re-run tests with V=1 environment variable set** > > ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion failed: > > (all_tables_match) > > Bail out! ERROR:../alt/tests/qtest/bios-tables-test.c:550:test_acpi_asl: assertion failed: > > (all_tables_match) > > Aborted (core dumped) > > > > s390 and passes on an x86 host, so I guess an endian bug - any chance of a table dump > from someone with access to an s390 host? > > This test covers some stuff that was previously missing tests > so may be non trivial to spot. > > I'll play guess in the meantime. So far I'm not seeing anything that differs > from existing ACPI table building code. Ok. I think it a bug earlier in this patch set. A table dump would confirm. One item that looks dodgy is the filling in of the ACPI HID. It's messy in the ACPI spec as it's defined as both an integer and a string. Need to take a 4 character string and get it into hid of struct { uint64_t hid; uint32_t uid; } which id done with an 8 byte memcpy. that is then written to SRAT wtih build_append_int_noprefix(table_data, handle->hid, 8); So I need to byte swap it if host doesn't match guest endian. I'll put together a patch, but perhaps best plan is if Michael drops generic ports and we go around again :( At least I don't have much backed up behind this one. Jonathan > > Jonathan > > > > > > r~ > >
© 2016 - 2024 Red Hat, Inc.