All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa
@ 2022-06-30  7:36 Brice Goglin
  2022-06-30  7:40 ` [PATCH v4 1/4] " Brice Goglin
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Brice Goglin @ 2022-06-30  7:36 UTC (permalink / raw)
  To: QEMU Developers
  Cc: Liu Jingqi, Eduardo Habkost, Marcel Apfelbaum,
	Philippe Mathieu-Daudé,
	Yanan Wang, Jonathan Cameron, Igor Mammedov


[-- Attachment #1.1: Type: text/plain, Size: 1500 bytes --]

Allow -numa without initiator value when hmat=on so that we may
build more complex topologies, e.g. NUMA nodes whose best initiators
are not just another single node.

changes v3->v4
* use -numa cpu instead of legacy cpus=
changes v2->v3:
* improve messages for patches 0/4 and 3/4
changes v1->v2:
* add q35 acpi test

Brice Goglin (4):
   hmat acpi: Don't require initiator value in -numa
   tests: acpi: add and whitelist *.hmat-noinitiator expected blobs
   tests: acpi: q35: add test for hmat nodes without initiators
   tests: acpi: q35: update expected blobs *.hmat-noinitiators

  hw/core/machine.c                             |   4 +-
  tests/data/acpi/q35/APIC.acpihmat-noinitiator | Bin 0 -> 144 bytes
  tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 0 -> 8553 bytes
  tests/data/acpi/q35/FACP.acpihmat-noinitiator | Bin 0 -> 244 bytes
  tests/data/acpi/q35/HMAT.acpihmat-noinitiator | Bin 0 -> 288 bytes
  tests/data/acpi/q35/SRAT.acpihmat-noinitiator | Bin 0 -> 312 bytes
  tests/qtest/bios-tables-test.c                |  49 ++++++++++++++++++
  7 files changed, 50 insertions(+), 3 deletions(-)
  create mode 100644 tests/data/acpi/q35/APIC.acpihmat-noinitiator
  create mode 100644 tests/data/acpi/q35/DSDT.acpihmat-noinitiator
  create mode 100644 tests/data/acpi/q35/FACP.acpihmat-noinitiator
  create mode 100644 tests/data/acpi/q35/HMAT.acpihmat-noinitiator
  create mode 100644 tests/data/acpi/q35/SRAT.acpihmat-noinitiator

-- 
2.30.2




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v4 1/4] hmat acpi: Don't require initiator value in -numa
  2022-06-30  7:36 [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa Brice Goglin
@ 2022-06-30  7:40 ` Brice Goglin
  2022-06-30 13:28   ` Michael S. Tsirkin
  2022-06-30  7:40 ` [PATCH v4 2/4] tests: acpi: add and whitelist *.hmat-noinitiator expected blobs Brice Goglin
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Brice Goglin @ 2022-06-30  7:40 UTC (permalink / raw)
  To: QEMU Developers
  Cc: Liu Jingqi, Eduardo Habkost, Marcel Apfelbaum,
	Philippe Mathieu-Daudé,
	Yanan Wang, Jonathan Cameron, Igor Mammedov


[-- Attachment #1.1: Type: text/plain, Size: 7273 bytes --]

The "Memory Proximity Domain Attributes" structure of the ACPI HMAT
has a "Processor Proximity Domain Valid" flag that is currently
always set because Qemu -numa requires an initiator=X value
when hmat=on. Unsetting this flag allows to create more complex
memory topologies by having multiple best initiators for a single
memory target.

This patch allows -numa without initiator=X when hmat=on by keeping
the default value MAX_NODES in numa_state->nodes[i].initiator.
All places reading numa_state->nodes[i].initiator already check
whether it's different from MAX_NODES before using it.

Tested with
qemu-system-x86_64 -accel kvm \
  -machine pc,hmat=on \
  -drive if=pflash,format=raw,file=./OVMF.fd \
  -drive media=disk,format=qcow2,file=efi.qcow2 \
  -smp 4 \
  -m 3G \
  -object memory-backend-ram,size=1G,id=ram0 \
  -object memory-backend-ram,size=1G,id=ram1 \
  -object memory-backend-ram,size=1G,id=ram2 \
  -numa node,nodeid=0,memdev=ram0,cpus=0-1 \
  -numa node,nodeid=1,memdev=ram1,cpus=2-3 \
  -numa node,nodeid=2,memdev=ram2 \
  -numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-latency,latency=10 \
  -numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-bandwidth,bandwidth=10485760 \
  -numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-latency,latency=20 \
  -numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-bandwidth,bandwidth=5242880 \
  -numa hmat-lb,initiator=0,target=2,hierarchy=memory,data-type=access-latency,latency=30 \
  -numa hmat-lb,initiator=0,target=2,hierarchy=memory,data-type=access-bandwidth,bandwidth=1048576 \
  -numa hmat-lb,initiator=1,target=0,hierarchy=memory,data-type=access-latency,latency=20 \
  -numa hmat-lb,initiator=1,target=0,hierarchy=memory,data-type=access-bandwidth,bandwidth=5242880 \
  -numa hmat-lb,initiator=1,target=1,hierarchy=memory,data-type=access-latency,latency=10 \
  -numa hmat-lb,initiator=1,target=1,hierarchy=memory,data-type=access-bandwidth,bandwidth=10485760 \
  -numa hmat-lb,initiator=1,target=2,hierarchy=memory,data-type=access-latency,latency=30 \
  -numa hmat-lb,initiator=1,target=2,hierarchy=memory,data-type=access-bandwidth,bandwidth=1048576
which reports NUMA node2 at same distance from both node0 and node1 as seen in lstopo:
Machine (2966MB total) + Package P#0
   NUMANode P#2 (979MB)
   Group0
     NUMANode P#0 (980MB)
     Core P#0 + PU P#0
     Core P#1 + PU P#1
   Group0
     NUMANode P#1 (1007MB)
     Core P#2 + PU P#2
     Core P#3 + PU P#3

Before this patch, we had to add ",initiator=X" to "-numa node,nodeid=2,memdev=ram2".
The lstopo output difference between initiator=1 and no initiator is:
@@ -1,10 +1,10 @@
  Machine (2966MB total) + Package P#0
+  NUMANode P#2 (979MB)
    Group0
      NUMANode P#0 (980MB)
      Core P#0 + PU P#0
      Core P#1 + PU P#1
    Group0
      NUMANode P#1 (1007MB)
-    NUMANode P#2 (979MB)
      Core P#2 + PU P#2
      Core P#3 + PU P#3

Corresponding changes in the HMAT MPDA structure:
@@ -49,10 +49,10 @@
  [078h 0120   2]               Structure Type : 0000 [Memory Proximity Domain Attributes]
  [07Ah 0122   2]                     Reserved : 0000
  [07Ch 0124   4]                       Length : 00000028
-[080h 0128   2]        Flags (decoded below) : 0001
-            Processor Proximity Domain Valid : 1
+[080h 0128   2]        Flags (decoded below) : 0000
+            Processor Proximity Domain Valid : 0
  [082h 0130   2]                    Reserved1 : 0000
-[084h 0132   4] Attached Initiator Proximity Domain : 00000001
+[084h 0132   4] Attached Initiator Proximity Domain : 00000080
  [088h 0136   4]      Memory Proximity Domain : 00000002
  [08Ch 0140   4]                    Reserved2 : 00000000
  [090h 0144   8]                    Reserved3 : 0000000000000000

Final HMAT SLLB structures:
[0A0h 0160   2]               Structure Type : 0001 [System Locality Latency and Bandwidth Information]
[0A2h 0162   2]                     Reserved : 0000
[0A4h 0164   4]                       Length : 00000040
[0A8h 0168   1]        Flags (decoded below) : 00
                             Memory Hierarchy : 0
[0A9h 0169   1]                    Data Type : 00
[0AAh 0170   2]                    Reserved1 : 0000
[0ACh 0172   4] Initiator Proximity Domains # : 00000002
[0B0h 0176   4]   Target Proximity Domains # : 00000003
[0B4h 0180   4]                    Reserved2 : 00000000
[0B8h 0184   8]              Entry Base Unit : 0000000000002710
[0C0h 0192   4] Initiator Proximity Domain List : 00000000
[0C4h 0196   4] Initiator Proximity Domain List : 00000001
[0C8h 0200   4] Target Proximity Domain List : 00000000
[0CCh 0204   4] Target Proximity Domain List : 00000001
[0D0h 0208   4] Target Proximity Domain List : 00000002
[0D4h 0212   2]                        Entry : 0001
[0D6h 0214   2]                        Entry : 0002
[0D8h 0216   2]                        Entry : 0003
[0DAh 0218   2]                        Entry : 0002
[0DCh 0220   2]                        Entry : 0001
[0DEh 0222   2]                        Entry : 0003

[0E0h 0224   2]               Structure Type : 0001 [System Locality Latency and Bandwidth Information]
[0E2h 0226   2]                     Reserved : 0000
[0E4h 0228   4]                       Length : 00000040
[0E8h 0232   1]        Flags (decoded below) : 00
                             Memory Hierarchy : 0
[0E9h 0233   1]                    Data Type : 03
[0EAh 0234   2]                    Reserved1 : 0000
[0ECh 0236   4] Initiator Proximity Domains # : 00000002
[0F0h 0240   4]   Target Proximity Domains # : 00000003
[0F4h 0244   4]                    Reserved2 : 00000000
[0F8h 0248   8]              Entry Base Unit : 0000000000000001
[100h 0256   4] Initiator Proximity Domain List : 00000000
[104h 0260   4] Initiator Proximity Domain List : 00000001
[108h 0264   4] Target Proximity Domain List : 00000000
[10Ch 0268   4] Target Proximity Domain List : 00000001
[110h 0272   4] Target Proximity Domain List : 00000002
[114h 0276   2]                        Entry : 000A
[116h 0278   2]                        Entry : 0005
[118h 0280   2]                        Entry : 0001
[11Ah 0282   2]                        Entry : 0005
[11Ch 0284   2]                        Entry : 000A
[11Eh 0286   2]                        Entry : 0001

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
  hw/core/machine.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/hw/core/machine.c b/hw/core/machine.c
index a673302cce..d4d7e77401 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -1173,9 +1173,7 @@ static void numa_validate_initiator(NumaState *numa_state)
  
      for (i = 0; i < numa_state->num_nodes; i++) {
          if (numa_info[i].initiator == MAX_NODES) {
-            error_report("The initiator of NUMA node %d is missing, use "
-                         "'-numa node,initiator' option to declare it", i);
-            exit(1);
+            continue;
          }
  
          if (!numa_info[numa_info[i].initiator].present) {
-- 
2.30.2




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v4 2/4] tests: acpi: add and whitelist *.hmat-noinitiator expected blobs
  2022-06-30  7:36 [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa Brice Goglin
  2022-06-30  7:40 ` [PATCH v4 1/4] " Brice Goglin
@ 2022-06-30  7:40 ` Brice Goglin
  2022-06-30  7:41 ` [PATCH v4 3/4] tests: acpi: q35: add test for hmat nodes without initiators Brice Goglin
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Brice Goglin @ 2022-06-30  7:40 UTC (permalink / raw)
  To: QEMU Developers
  Cc: Liu Jingqi, Eduardo Habkost, Marcel Apfelbaum,
	Philippe Mathieu-Daudé,
	Yanan Wang, Jonathan Cameron, Igor Mammedov


[-- Attachment #1.1: Type: text/plain, Size: 2327 bytes --]

.. which will be used by follow up hmat-noinitiator test-case.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
  tests/data/acpi/q35/APIC.acpihmat-noinitiator | 0
  tests/data/acpi/q35/DSDT.acpihmat-noinitiator | 0
  tests/data/acpi/q35/FACP.acpihmat-noinitiator | 0
  tests/data/acpi/q35/HMAT.acpihmat-noinitiator | 0
  tests/data/acpi/q35/SRAT.acpihmat-noinitiator | 0
  tests/qtest/bios-tables-test-allowed-diff.h   | 5 +++++
  6 files changed, 5 insertions(+)
  create mode 100644 tests/data/acpi/q35/APIC.acpihmat-noinitiator
  create mode 100644 tests/data/acpi/q35/DSDT.acpihmat-noinitiator
  create mode 100644 tests/data/acpi/q35/FACP.acpihmat-noinitiator
  create mode 100644 tests/data/acpi/q35/HMAT.acpihmat-noinitiator
  create mode 100644 tests/data/acpi/q35/SRAT.acpihmat-noinitiator

diff --git a/tests/data/acpi/q35/APIC.acpihmat-noinitiator b/tests/data/acpi/q35/APIC.acpihmat-noinitiator
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/data/acpi/q35/DSDT.acpihmat-noinitiator b/tests/data/acpi/q35/DSDT.acpihmat-noinitiator
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/data/acpi/q35/FACP.acpihmat-noinitiator b/tests/data/acpi/q35/FACP.acpihmat-noinitiator
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/data/acpi/q35/HMAT.acpihmat-noinitiator b/tests/data/acpi/q35/HMAT.acpihmat-noinitiator
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/data/acpi/q35/SRAT.acpihmat-noinitiator b/tests/data/acpi/q35/SRAT.acpihmat-noinitiator
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index dfb8523c8b..ae025e3a3e 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1 +1,6 @@
  /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/q35/APIC.acpihmat-noinitiator",
+"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
+"tests/data/acpi/q35/FACP.acpihmat-noinitiator",
+"tests/data/acpi/q35/HMAT.acpihmat-noinitiator",
+"tests/data/acpi/q35/SRAT.acpihmat-noinitiator",
-- 
2.30.2




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v4 3/4] tests: acpi: q35: add test for hmat nodes without initiators
  2022-06-30  7:36 [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa Brice Goglin
  2022-06-30  7:40 ` [PATCH v4 1/4] " Brice Goglin
  2022-06-30  7:40 ` [PATCH v4 2/4] tests: acpi: add and whitelist *.hmat-noinitiator expected blobs Brice Goglin
@ 2022-06-30  7:41 ` Brice Goglin
  2022-06-30  7:41 ` [PATCH v4 4/4] tests: acpi: q35: update expected blobs *.hmat-noinitiators Brice Goglin
  2022-06-30 12:23 ` [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa Igor Mammedov
  4 siblings, 0 replies; 13+ messages in thread
From: Brice Goglin @ 2022-06-30  7:41 UTC (permalink / raw)
  To: QEMU Developers
  Cc: Liu Jingqi, Eduardo Habkost, Marcel Apfelbaum,
	Philippe Mathieu-Daudé,
	Yanan Wang, Jonathan Cameron, Igor Mammedov


[-- Attachment #1.1: Type: text/plain, Size: 10929 bytes --]

Build a machine with 2 sockets with 2 cores each,
and 3 NUMA nodes.
1st NUMA is local to socket #0 (cores #0-1).
2nd NUMA is local to socket #1 (cores #2-3).
3rd NUMA has no initiator.
HMAT SLLB says memory access performance of 3rd NUMA is lower,
but it's identical for both sockets
hence all cores are its best initiator.

Expected HMAT:

[000h 0000   4]                    Signature : "HMAT"    [Heterogeneous Memory Attributes Table]
[004h 0004   4]                 Table Length : 00000120
[008h 0008   1]                     Revision : 02
[009h 0009   1]                     Checksum : 4F
[00Ah 0010   6]                       Oem ID : "BOCHS "
[010h 0016   8]                 Oem Table ID : "BXPC    "
[018h 0024   4]                 Oem Revision : 00000001
[01Ch 0028   4]              Asl Compiler ID : "BXPC"
[020h 0032   4]        Asl Compiler Revision : 00000001

[024h 0036   4]                     Reserved : 00000000

[028h 0040   2]               Structure Type : 0000 [Memory Proximity Domain Attributes]
[02Ah 0042   2]                     Reserved : 0000
[02Ch 0044   4]                       Length : 00000028
[030h 0048   2]        Flags (decoded below) : 0001
             Processor Proximity Domain Valid : 1
[032h 0050   2]                    Reserved1 : 0000
[034h 0052   4] Attached Initiator Proximity Domain : 00000000
[038h 0056   4]      Memory Proximity Domain : 00000000
[03Ch 0060   4]                    Reserved2 : 00000000
[040h 0064   8]                    Reserved3 : 0000000000000000
[048h 0072   8]                    Reserved4 : 0000000000000000

[050h 0080   2]               Structure Type : 0000 [Memory Proximity Domain Attributes]
[052h 0082   2]                     Reserved : 0000
[054h 0084   4]                       Length : 00000028
[058h 0088   2]        Flags (decoded below) : 0001
             Processor Proximity Domain Valid : 1
[05Ah 0090   2]                    Reserved1 : 0000
[05Ch 0092   4] Attached Initiator Proximity Domain : 00000001
[060h 0096   4]      Memory Proximity Domain : 00000001
[064h 0100   4]                    Reserved2 : 00000000
[068h 0104   8]                    Reserved3 : 0000000000000000
[070h 0112   8]                    Reserved4 : 0000000000000000

[078h 0120   2]               Structure Type : 0000 [Memory Proximity Domain Attributes]
[07Ah 0122   2]                     Reserved : 0000
[07Ch 0124   4]                       Length : 00000028
[080h 0128   2]        Flags (decoded below) : 0000
             Processor Proximity Domain Valid : 0
[082h 0130   2]                    Reserved1 : 0000
[084h 0132   4] Attached Initiator Proximity Domain : 00000080
[088h 0136   4]      Memory Proximity Domain : 00000002
[08Ch 0140   4]                    Reserved2 : 00000000
[090h 0144   8]                    Reserved3 : 0000000000000000
[098h 0152   8]                    Reserved4 : 0000000000000000

[0A0h 0160   2]               Structure Type : 0001 [System Locality Latency and Bandwidth Information]
[0A2h 0162   2]                     Reserved : 0000
[0A4h 0164   4]                       Length : 00000040
[0A8h 0168   1]        Flags (decoded below) : 00
                             Memory Hierarchy : 0
[0A9h 0169   1]                    Data Type : 00
[0AAh 0170   2]                    Reserved1 : 0000
[0ACh 0172   4] Initiator Proximity Domains # : 00000002
[0B0h 0176   4]   Target Proximity Domains # : 00000003
[0B4h 0180   4]                    Reserved2 : 00000000
[0B8h 0184   8]              Entry Base Unit : 0000000000002710
[0C0h 0192   4] Initiator Proximity Domain List : 00000000
[0C4h 0196   4] Initiator Proximity Domain List : 00000001
[0C8h 0200   4] Target Proximity Domain List : 00000000
[0CCh 0204   4] Target Proximity Domain List : 00000001
[0D0h 0208   4] Target Proximity Domain List : 00000002
[0D4h 0212   2]                        Entry : 0001
[0D6h 0214   2]                        Entry : 0002
[0D8h 0216   2]                        Entry : 0003
[0DAh 0218   2]                        Entry : 0002
[0DCh 0220   2]                        Entry : 0001
[0DEh 0222   2]                        Entry : 0003

[0E0h 0224   2]               Structure Type : 0001 [System Locality Latency and Bandwidth Information]
[0E2h 0226   2]                     Reserved : 0000
[0E4h 0228   4]                       Length : 00000040
[0E8h 0232   1]        Flags (decoded below) : 00
                             Memory Hierarchy : 0
[0E9h 0233   1]                    Data Type : 03
[0EAh 0234   2]                    Reserved1 : 0000
[0ECh 0236   4] Initiator Proximity Domains # : 00000002
[0F0h 0240   4]   Target Proximity Domains # : 00000003
[0F4h 0244   4]                    Reserved2 : 00000000
[0F8h 0248   8]              Entry Base Unit : 0000000000000001
[100h 0256   4] Initiator Proximity Domain List : 00000000
[104h 0260   4] Initiator Proximity Domain List : 00000001
[108h 0264   4] Target Proximity Domain List : 00000000
[10Ch 0268   4] Target Proximity Domain List : 00000001
[110h 0272   4] Target Proximity Domain List : 00000002
[114h 0276   2]                        Entry : 000A
[116h 0278   2]                        Entry : 0005
[118h 0280   2]                        Entry : 0001
[11Ah 0282   2]                        Entry : 0005
[11Ch 0284   2]                        Entry : 000A
[11Eh 0286   2]                        Entry : 0001

Raw Table Data: Length 288 (0x120)

     0000: 48 4D 41 54 20 01 00 00 02 4F 42 4F 43 48 53 20  // HMAT ....OBOCHS
     0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43  // BXPC    ....BXPC
     0020: 01 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00  // ............(...
     0030: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
     0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
     0050: 00 00 00 00 28 00 00 00 01 00 00 00 01 00 00 00  // ....(...........
     0060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
     0070: 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00  // ............(...
     0080: 00 00 00 00 80 00 00 00 02 00 00 00 00 00 00 00  // ................
     0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
     00A0: 01 00 00 00 40 00 00 00 00 00 00 00 02 00 00 00  // ....@...........
     00B0: 03 00 00 00 00 00 00 00 10 27 00 00 00 00 00 00  // .........'......
     00C0: 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00  // ................
     00D0: 02 00 00 00 01 00 02 00 03 00 02 00 01 00 03 00  // ................
     00E0: 01 00 00 00 40 00 00 00 00 03 00 00 02 00 00 00  // ....@...........
     00F0: 03 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  // ................
     0100: 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00  // ................
     0110: 02 00 00 00 0A 00 05 00 01 00 05 00 0A 00 01 00  // ................

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
  tests/qtest/bios-tables-test.c | 49 ++++++++++++++++++++++++++++++++++
  1 file changed, 49 insertions(+)

diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 359916c228..0cea6684dc 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -1461,6 +1461,54 @@ static void test_acpi_piix4_tcg_acpi_hmat(void)
      test_acpi_tcg_acpi_hmat(MACHINE_PC);
  }
  
+static void test_acpi_q35_tcg_acpi_hmat_noinitiator(void)
+{
+    test_data data;
+
+    memset(&data, 0, sizeof(data));
+    data.machine = MACHINE_Q35;
+    data.variant = ".acpihmat-noinitiator";
+    test_acpi_one(" -machine hmat=on"
+                  " -smp 4,sockets=2"
+                  " -m 128M"
+                  " -object memory-backend-ram,size=32M,id=ram0"
+                  " -object memory-backend-ram,size=32M,id=ram1"
+                  " -object memory-backend-ram,size=64M,id=ram2"
+                  " -numa node,nodeid=0,memdev=ram0"
+                  " -numa node,nodeid=1,memdev=ram1"
+                  " -numa node,nodeid=2,memdev=ram2"
+                  " -numa cpu,node-id=0,socket-id=0"
+                  " -numa cpu,node-id=0,socket-id=0"
+                  " -numa cpu,node-id=1,socket-id=1"
+                  " -numa cpu,node-id=1,socket-id=1"
+                  " -numa hmat-lb,initiator=0,target=0,hierarchy=memory,"
+                  "data-type=access-latency,latency=10"
+                  " -numa hmat-lb,initiator=0,target=0,hierarchy=memory,"
+                  "data-type=access-bandwidth,bandwidth=10485760"
+                  " -numa hmat-lb,initiator=0,target=1,hierarchy=memory,"
+                  "data-type=access-latency,latency=20"
+                  " -numa hmat-lb,initiator=0,target=1,hierarchy=memory,"
+                  "data-type=access-bandwidth,bandwidth=5242880"
+                  " -numa hmat-lb,initiator=0,target=2,hierarchy=memory,"
+                  "data-type=access-latency,latency=30"
+                  " -numa hmat-lb,initiator=0,target=2,hierarchy=memory,"
+                  "data-type=access-bandwidth,bandwidth=1048576"
+                  " -numa hmat-lb,initiator=1,target=0,hierarchy=memory,"
+                  "data-type=access-latency,latency=20"
+                  " -numa hmat-lb,initiator=1,target=0,hierarchy=memory,"
+                  "data-type=access-bandwidth,bandwidth=5242880"
+                  " -numa hmat-lb,initiator=1,target=1,hierarchy=memory,"
+                  "data-type=access-latency,latency=10"
+                  " -numa hmat-lb,initiator=1,target=1,hierarchy=memory,"
+                  "data-type=access-bandwidth,bandwidth=10485760"
+                  " -numa hmat-lb,initiator=1,target=2,hierarchy=memory,"
+                  "data-type=access-latency,latency=30"
+                  " -numa hmat-lb,initiator=1,target=2,hierarchy=memory,"
+                  "data-type=access-bandwidth,bandwidth=1048576",
+                  &data);
+    free_test_data(&data);
+}
+
  static void test_acpi_erst(const char *machine)
  {
      gchar *tmp_path = g_dir_make_tmp("qemu-test-erst.XXXXXX", NULL);
@@ -1803,6 +1851,7 @@ int main(int argc, char *argv[])
          qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm);
          qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_tcg_acpi_hmat);
          qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_tcg_acpi_hmat);
+        qtest_add_func("acpi/q35/acpihmat-noinitiator", test_acpi_q35_tcg_acpi_hmat_noinitiator);
          qtest_add_func("acpi/piix4/acpierst", test_acpi_piix4_acpi_erst);
          qtest_add_func("acpi/q35/acpierst", test_acpi_q35_acpi_erst);
          qtest_add_func("acpi/q35/applesmc", test_acpi_q35_applesmc);
-- 
2.30.2




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v4 4/4] tests: acpi: q35: update expected blobs *.hmat-noinitiators
  2022-06-30  7:36 [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa Brice Goglin
                   ` (2 preceding siblings ...)
  2022-06-30  7:41 ` [PATCH v4 3/4] tests: acpi: q35: add test for hmat nodes without initiators Brice Goglin
@ 2022-06-30  7:41 ` Brice Goglin
  2022-06-30 12:23 ` [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa Igor Mammedov
  4 siblings, 0 replies; 13+ messages in thread
From: Brice Goglin @ 2022-06-30  7:41 UTC (permalink / raw)
  To: QEMU Developers
  Cc: Liu Jingqi, Eduardo Habkost, Marcel Apfelbaum,
	Philippe Mathieu-Daudé,
	Yanan Wang, Jonathan Cameron, Igor Mammedov


[-- Attachment #1.1: Type: text/plain, Size: 13958 bytes --]

expected HMAT:

[000h 0000   4]                    Signature : "HMAT"    [Heterogeneous Memory Attributes Table]
[004h 0004   4]                 Table Length : 00000120
[008h 0008   1]                     Revision : 02
[009h 0009   1]                     Checksum : 4F
[00Ah 0010   6]                       Oem ID : "BOCHS "
[010h 0016   8]                 Oem Table ID : "BXPC    "
[018h 0024   4]                 Oem Revision : 00000001
[01Ch 0028   4]              Asl Compiler ID : "BXPC"
[020h 0032   4]        Asl Compiler Revision : 00000001

[024h 0036   4]                     Reserved : 00000000

[028h 0040   2]               Structure Type : 0000 [Memory Proximity Domain Attributes]
[02Ah 0042   2]                     Reserved : 0000
[02Ch 0044   4]                       Length : 00000028
[030h 0048   2]        Flags (decoded below) : 0001
             Processor Proximity Domain Valid : 1
[032h 0050   2]                    Reserved1 : 0000
[034h 0052   4] Attached Initiator Proximity Domain : 00000000
[038h 0056   4]      Memory Proximity Domain : 00000000
[03Ch 0060   4]                    Reserved2 : 00000000
[040h 0064   8]                    Reserved3 : 0000000000000000
[048h 0072   8]                    Reserved4 : 0000000000000000

[050h 0080   2]               Structure Type : 0000 [Memory Proximity Domain Attributes]
[052h 0082   2]                     Reserved : 0000
[054h 0084   4]                       Length : 00000028
[058h 0088   2]        Flags (decoded below) : 0001
             Processor Proximity Domain Valid : 1
[05Ah 0090   2]                    Reserved1 : 0000
[05Ch 0092   4] Attached Initiator Proximity Domain : 00000001
[060h 0096   4]      Memory Proximity Domain : 00000001
[064h 0100   4]                    Reserved2 : 00000000
[068h 0104   8]                    Reserved3 : 0000000000000000
[070h 0112   8]                    Reserved4 : 0000000000000000

[078h 0120   2]               Structure Type : 0000 [Memory Proximity Domain Attributes]
[07Ah 0122   2]                     Reserved : 0000
[07Ch 0124   4]                       Length : 00000028
[080h 0128   2]        Flags (decoded below) : 0000
             Processor Proximity Domain Valid : 0
[082h 0130   2]                    Reserved1 : 0000
[084h 0132   4] Attached Initiator Proximity Domain : 00000080
[088h 0136   4]      Memory Proximity Domain : 00000002
[08Ch 0140   4]                    Reserved2 : 00000000
[090h 0144   8]                    Reserved3 : 0000000000000000
[098h 0152   8]                    Reserved4 : 0000000000000000

[0A0h 0160   2]               Structure Type : 0001 [System Locality Latency and Bandwidth Information]
[0A2h 0162   2]                     Reserved : 0000
[0A4h 0164   4]                       Length : 00000040
[0A8h 0168   1]        Flags (decoded below) : 00
                             Memory Hierarchy : 0
[0A9h 0169   1]                    Data Type : 00
[0AAh 0170   2]                    Reserved1 : 0000
[0ACh 0172   4] Initiator Proximity Domains # : 00000002
[0B0h 0176   4]   Target Proximity Domains # : 00000003
[0B4h 0180   4]                    Reserved2 : 00000000
[0B8h 0184   8]              Entry Base Unit : 0000000000002710
[0C0h 0192   4] Initiator Proximity Domain List : 00000000
[0C4h 0196   4] Initiator Proximity Domain List : 00000001
[0C8h 0200   4] Target Proximity Domain List : 00000000
[0CCh 0204   4] Target Proximity Domain List : 00000001
[0D0h 0208   4] Target Proximity Domain List : 00000002
[0D4h 0212   2]                        Entry : 0001
[0D6h 0214   2]                        Entry : 0002
[0D8h 0216   2]                        Entry : 0003
[0DAh 0218   2]                        Entry : 0002
[0DCh 0220   2]                        Entry : 0001
[0DEh 0222   2]                        Entry : 0003

[0E0h 0224   2]               Structure Type : 0001 [System Locality Latency and Bandwidth Information]
[0E2h 0226   2]                     Reserved : 0000
[0E4h 0228   4]                       Length : 00000040
[0E8h 0232   1]        Flags (decoded below) : 00
                             Memory Hierarchy : 0
[0E9h 0233   1]                    Data Type : 03
[0EAh 0234   2]                    Reserved1 : 0000
[0ECh 0236   4] Initiator Proximity Domains # : 00000002
[0F0h 0240   4]   Target Proximity Domains # : 00000003
[0F4h 0244   4]                    Reserved2 : 00000000
[0F8h 0248   8]              Entry Base Unit : 0000000000000001
[100h 0256   4] Initiator Proximity Domain List : 00000000
[104h 0260   4] Initiator Proximity Domain List : 00000001
[108h 0264   4] Target Proximity Domain List : 00000000
[10Ch 0268   4] Target Proximity Domain List : 00000001
[110h 0272   4] Target Proximity Domain List : 00000002
[114h 0276   2]                        Entry : 000A
[116h 0278   2]                        Entry : 0005
[118h 0280   2]                        Entry : 0001
[11Ah 0282   2]                        Entry : 0005
[11Ch 0284   2]                        Entry : 000A
[11Eh 0286   2]                        Entry : 0001

Raw Table Data: Length 288 (0x120)

     0000: 48 4D 41 54 20 01 00 00 02 4F 42 4F 43 48 53 20  // HMAT ....OBOCHS
     0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43  // BXPC    ....BXPC
     0020: 01 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00  // ............(...
     0030: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
     0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
     0050: 00 00 00 00 28 00 00 00 01 00 00 00 01 00 00 00  // ....(...........
     0060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
     0070: 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00  // ............(...
     0080: 00 00 00 00 80 00 00 00 02 00 00 00 00 00 00 00  // ................
     0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
     00A0: 01 00 00 00 40 00 00 00 00 00 00 00 02 00 00 00  // ....@...........
     00B0: 03 00 00 00 00 00 00 00 10 27 00 00 00 00 00 00  // .........'......
     00C0: 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00  // ................
     00D0: 02 00 00 00 01 00 02 00 03 00 02 00 01 00 03 00  // ................
     00E0: 01 00 00 00 40 00 00 00 00 03 00 00 02 00 00 00  // ....@...........
     00F0: 03 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  // ................
     0100: 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00  // ................
     0110: 02 00 00 00 0A 00 05 00 01 00 05 00 0A 00 01 00  // ................

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
  tests/data/acpi/q35/APIC.acpihmat-noinitiator | Bin 0 -> 144 bytes
  tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 0 -> 8553 bytes
  tests/data/acpi/q35/FACP.acpihmat-noinitiator | Bin 0 -> 244 bytes
  tests/data/acpi/q35/HMAT.acpihmat-noinitiator | Bin 0 -> 288 bytes
  tests/data/acpi/q35/SRAT.acpihmat-noinitiator | Bin 0 -> 312 bytes
  tests/qtest/bios-tables-test-allowed-diff.h   |   5 -----
  6 files changed, 5 deletions(-)

diff --git a/tests/data/acpi/q35/APIC.acpihmat-noinitiator b/tests/data/acpi/q35/APIC.acpihmat-noinitiator
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d904d4a70ddecbb79a83a267af8e26f925e9f4c6 100644
GIT binary patch
literal 144
zcmZ<^@N}NQz`(%h?d0$55v<@85#X!<1dKp25F11@Fg*ANra6G>KwJ(+MhMNs1fiLk
tK{O)|Nb<lx5Xr;^#2^NU#mWk#c|j~rP8f>|r~o3y%?)O;u>A)b0RWi;3;_TD

literal 0
HcmV?d00001

diff --git a/tests/data/acpi/q35/DSDT.acpihmat-noinitiator b/tests/data/acpi/q35/DSDT.acpihmat-noinitiator
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c767d11cb1d088f613c49e55a7139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WbB-bTNl<u61h`@b!#hf_;xX*y;$T%CoaYBKG)36|
E0Xe$wY5)KL

literal 0
HcmV?d00001

diff --git a/tests/data/acpi/q35/FACP.acpihmat-noinitiator b/tests/data/acpi/q35/FACP.acpihmat-noinitiator
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a8f6a8961109d01059aceef9f1869cde09a2f10c 100644
GIT binary patch
literal 244
zcmZ>BbPo8!z`($~-O1nCBUr&HBEVSz2pEB4AU24G0Y(N+hD|^Y6El!tgNU*~X%LSC
z$X0-fGcm9T0LA|E|L2FOWMD92VqjR>!oa}D!NBm72O<iWged~jj0!*k$y^{03>bk1
YBHITON2VDSAnpK(F*YFF1LDH~0P8Id0RR91

literal 0
HcmV?d00001

diff --git a/tests/data/acpi/q35/HMAT.acpihmat-noinitiator b/tests/data/acpi/q35/HMAT.acpihmat-noinitiator
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6494d11b9fff54f8c403ec9e4893fdff72bde9c9 100644
GIT binary patch
literal 288
zcmaJ)F%Ezr5IZ0&Og@24pP{g@7)*5VIX>Ms;S4dxCU-4Odz5uKq7kt*)m-+N&Mij(
zmQa%w6GZ=3|IM0X_Ak#IabYaQ2iTvR&x~t&7@Gj;A7o|>w!;|gr;lRa*AB0!)_xEV
I&r86*0dKzu0RR91

literal 0
HcmV?d00001

diff --git a/tests/data/acpi/q35/SRAT.acpihmat-noinitiator b/tests/data/acpi/q35/SRAT.acpihmat-noinitiator
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a11d3119ab3538d9cf821a4fe0fccb0f1dc96359 100644
GIT binary patch
literal 312
zcmWFzatyIxWME)?>E!S15v<@85#X!<1VAAM5F12;FdPVA@EK9%8JW=d%*cF34Y)~A
u1{YiayE>qSVDJGh4QBww88zTMCa6LfjpA-b4Y)81R2_^)QwNnLKmh<Kp$P#1

literal 0
HcmV?d00001

diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index ae025e3a3e..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-noinitiator",
-"tests/data/acpi/q35/DSDT.acpihmat-noinitiator",
-"tests/data/acpi/q35/FACP.acpihmat-noinitiator",
-"tests/data/acpi/q35/HMAT.acpihmat-noinitiator",
-"tests/data/acpi/q35/SRAT.acpihmat-noinitiator",
-- 
2.30.2




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa
  2022-06-30  7:36 [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa Brice Goglin
                   ` (3 preceding siblings ...)
  2022-06-30  7:41 ` [PATCH v4 4/4] tests: acpi: q35: update expected blobs *.hmat-noinitiators Brice Goglin
@ 2022-06-30 12:23 ` Igor Mammedov
  2022-06-30 12:40   ` Brice Goglin
  4 siblings, 1 reply; 13+ messages in thread
From: Igor Mammedov @ 2022-06-30 12:23 UTC (permalink / raw)
  To: Brice Goglin
  Cc: QEMU Developers, Liu Jingqi, Eduardo Habkost, Marcel Apfelbaum,
	Philippe Mathieu-Daudé,
	Yanan Wang, Jonathan Cameron

On Thu, 30 Jun 2022 09:36:47 +0200
Brice Goglin <Brice.Goglin@inria.fr> wrote:

> Allow -numa without initiator value when hmat=on so that we may
> build more complex topologies, e.g. NUMA nodes whose best initiators
> are not just another single node.
>

patches looks fine code-wise,
however something wrong with them, i.e. 'git am' doesn't like them
nor ./scripts/checkpatch (which one should use before sending patches).

I've checked it's not my mail server/client issue(or whatever)
that corrupts them (ones downloaded from patchew are broken as well)

> changes v3->v4
> * use -numa cpu instead of legacy cpus=
> changes v2->v3:
> * improve messages for patches 0/4 and 3/4
> changes v1->v2:
> * add q35 acpi test
> 
> Brice Goglin (4):
>    hmat acpi: Don't require initiator value in -numa
>    tests: acpi: add and whitelist *.hmat-noinitiator expected blobs
>    tests: acpi: q35: add test for hmat nodes without initiators
>    tests: acpi: q35: update expected blobs *.hmat-noinitiators
> 
>   hw/core/machine.c                             |   4 +-
>   tests/data/acpi/q35/APIC.acpihmat-noinitiator | Bin 0 -> 144 bytes
>   tests/data/acpi/q35/DSDT.acpihmat-noinitiator | Bin 0 -> 8553 bytes
>   tests/data/acpi/q35/FACP.acpihmat-noinitiator | Bin 0 -> 244 bytes
>   tests/data/acpi/q35/HMAT.acpihmat-noinitiator | Bin 0 -> 288 bytes
>   tests/data/acpi/q35/SRAT.acpihmat-noinitiator | Bin 0 -> 312 bytes
>   tests/qtest/bios-tables-test.c                |  49 ++++++++++++++++++
>   7 files changed, 50 insertions(+), 3 deletions(-)
>   create mode 100644 tests/data/acpi/q35/APIC.acpihmat-noinitiator
>   create mode 100644 tests/data/acpi/q35/DSDT.acpihmat-noinitiator
>   create mode 100644 tests/data/acpi/q35/FACP.acpihmat-noinitiator
>   create mode 100644 tests/data/acpi/q35/HMAT.acpihmat-noinitiator
>   create mode 100644 tests/data/acpi/q35/SRAT.acpihmat-noinitiator
> 



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa
  2022-06-30 12:23 ` [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa Igor Mammedov
@ 2022-06-30 12:40   ` Brice Goglin
  2022-06-30 12:56     ` Igor Mammedov
  2022-06-30 13:30     ` Michael S. Tsirkin
  0 siblings, 2 replies; 13+ messages in thread
From: Brice Goglin @ 2022-06-30 12:40 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: QEMU Developers, Liu Jingqi, Eduardo Habkost, Marcel Apfelbaum,
	Philippe Mathieu-Daudé,
	Yanan Wang, Jonathan Cameron


[-- Attachment #1.1: Type: text/plain, Size: 887 bytes --]


Le 30/06/2022 à 14:23, Igor Mammedov a écrit :
> On Thu, 30 Jun 2022 09:36:47 +0200
> Brice Goglin <Brice.Goglin@inria.fr> wrote:
>
>> Allow -numa without initiator value when hmat=on so that we may
>> build more complex topologies, e.g. NUMA nodes whose best initiators
>> are not just another single node.
>>
> patches looks fine code-wise,
> however something wrong with them, i.e. 'git am' doesn't like them
> nor ./scripts/checkpatch (which one should use before sending patches).
>
> I've checked it's not my mail server/client issue(or whatever)
> that corrupts them (ones downloaded from patchew are broken as well)


I don't know what's going on. These 4 patches are in 
https://github.com/bgoglin/qemu/commits/hmat-noinitiator (rebased on 
master 10mn ago).

Do whatever you want with them. I am not allowed to spend more time on this.

Brice




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa
  2022-06-30 12:40   ` Brice Goglin
@ 2022-06-30 12:56     ` Igor Mammedov
  2022-06-30 13:29       ` Michael S. Tsirkin
  2022-06-30 13:30     ` Michael S. Tsirkin
  1 sibling, 1 reply; 13+ messages in thread
From: Igor Mammedov @ 2022-06-30 12:56 UTC (permalink / raw)
  To: Brice Goglin
  Cc: QEMU Developers, Liu Jingqi, Philippe Mathieu-Daudé,
	Yanan Wang, Jonathan Cameron, mst

On Thu, 30 Jun 2022 14:40:13 +0200
Brice Goglin <Brice.Goglin@inria.fr> wrote:

> Le 30/06/2022 à 14:23, Igor Mammedov a écrit :
> > On Thu, 30 Jun 2022 09:36:47 +0200
> > Brice Goglin <Brice.Goglin@inria.fr> wrote:
> >  
> >> Allow -numa without initiator value when hmat=on so that we may
> >> build more complex topologies, e.g. NUMA nodes whose best initiators
> >> are not just another single node.
> >>  
> > patches looks fine code-wise,
> > however something wrong with them, i.e. 'git am' doesn't like them
> > nor ./scripts/checkpatch (which one should use before sending patches).
> >
> > I've checked it's not my mail server/client issue(or whatever)
> > that corrupts them (ones downloaded from patchew are broken as well)  
> 
> 
> I don't know what's going on. These 4 patches are in 
> https://github.com/bgoglin/qemu/commits/hmat-noinitiator (rebased on 
> master 10mn ago).

I'm not sure if we take patches from directly from git-forges,
I guess it's upto maintainers.

CCing Michael,
 since these should go through his tree

> 
> Do whatever you want with them. I am not allowed to spend more time on this.
> 
> Brice
> 
> 
> 



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v4 1/4] hmat acpi: Don't require initiator value in -numa
  2022-06-30  7:40 ` [PATCH v4 1/4] " Brice Goglin
@ 2022-06-30 13:28   ` Michael S. Tsirkin
  0 siblings, 0 replies; 13+ messages in thread
From: Michael S. Tsirkin @ 2022-06-30 13:28 UTC (permalink / raw)
  To: Brice Goglin
  Cc: QEMU Developers, Liu Jingqi, Eduardo Habkost, Marcel Apfelbaum,
	Philippe Mathieu-Daudé,
	Yanan Wang, Jonathan Cameron, Igor Mammedov

On Thu, Jun 30, 2022 at 09:40:19AM +0200, Brice Goglin wrote:


...


> 
> Before this patch, we had to add ",initiator=X" to "-numa node,nodeid=2,memdev=ram2".
> The lstopo output difference between initiator=1 and no initiator is:
> @@ -1,10 +1,10 @@
>  Machine (2966MB total) + Package P#0
> +  NUMANode P#2 (979MB)
>    Group0
>      NUMANode P#0 (980MB)
>      Core P#0 + PU P#0
>      Core P#1 + PU P#1
>    Group0
>      NUMANode P#1 (1007MB)
> -    NUMANode P#2 (979MB)
>      Core P#2 + PU P#2
>      Core P#3 + PU P#3
> 
> Corresponding changes in the HMAT MPDA structure:
> @@ -49,10 +49,10 @@
>  [078h 0120   2]               Structure Type : 0000 [Memory Proximity Domain Attributes]
>  [07Ah 0122   2]                     Reserved : 0000
>  [07Ch 0124   4]                       Length : 00000028
> -[080h 0128   2]        Flags (decoded below) : 0001
> -            Processor Proximity Domain Valid : 1
> +[080h 0128   2]        Flags (decoded below) : 0000

Including diff output like this is what is confusing
mail processing tools. Just escape the diff in the output
and this will make git happy. E.g.:

The lstopo output difference between initiator=1 and no initiator is:

| @@ -1,10 +1,10 @@
|  Machine (2966MB total) + Package P#0
| +  NUMANode P#2 (979MB)
|    Group0
|      NUMANode P#0 (980MB)
|      Core P#0 + PU P#0
|      Core P#1 + PU P#1
|    Group0
|      NUMANode P#1 (1007MB)
| -    NUMANode P#2 (979MB)
|      Core P#2 + PU P#2
|      Core P#3 + PU P#3
| 
| Corresponding changes in the HMAT MPDA structure:
| @@ -49,10 +49,10 @@
|  [078h 0120   2]               Structure Type : 0000 [Memory Proximity Domain Attributes]
|  [07Ah 0122   2]                     Reserved : 0000
|  [07Ch 0124   4]                       Length : 00000028
| -[080h 0128   2]        Flags (decoded below) : 0001
| -            Processor Proximity Domain Valid : 1
| +[080h 0128   2]        Flags (decoded below) : 0000




-- 
MST



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa
  2022-06-30 12:56     ` Igor Mammedov
@ 2022-06-30 13:29       ` Michael S. Tsirkin
  0 siblings, 0 replies; 13+ messages in thread
From: Michael S. Tsirkin @ 2022-06-30 13:29 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: Brice Goglin, QEMU Developers, Liu Jingqi,
	Philippe Mathieu-Daudé,
	Yanan Wang, Jonathan Cameron

On Thu, Jun 30, 2022 at 02:56:16PM +0200, Igor Mammedov wrote:
> On Thu, 30 Jun 2022 14:40:13 +0200
> Brice Goglin <Brice.Goglin@inria.fr> wrote:
> 
> > Le 30/06/2022 à 14:23, Igor Mammedov a écrit :
> > > On Thu, 30 Jun 2022 09:36:47 +0200
> > > Brice Goglin <Brice.Goglin@inria.fr> wrote:
> > >  
> > >> Allow -numa without initiator value when hmat=on so that we may
> > >> build more complex topologies, e.g. NUMA nodes whose best initiators
> > >> are not just another single node.
> > >>  
> > > patches looks fine code-wise,
> > > however something wrong with them, i.e. 'git am' doesn't like them
> > > nor ./scripts/checkpatch (which one should use before sending patches).
> > >
> > > I've checked it's not my mail server/client issue(or whatever)
> > > that corrupts them (ones downloaded from patchew are broken as well)  
> > 
> > 
> > I don't know what's going on. These 4 patches are in 
> > https://github.com/bgoglin/qemu/commits/hmat-noinitiator (rebased on 
> > master 10mn ago).
> 
> I'm not sure if we take patches from directly from git-forges,
> I guess it's upto maintainers.
> 
> CCing Michael,
>  since these should go through his tree

I could if nothing else worked, but I would much rather get
patches that did get processed by patchew and other automated
mail based tools.


> > 
> > Do whatever you want with them. I am not allowed to spend more time on this.
> > 
> > Brice
> > 
> > 
> > 



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa
  2022-06-30 12:40   ` Brice Goglin
  2022-06-30 12:56     ` Igor Mammedov
@ 2022-06-30 13:30     ` Michael S. Tsirkin
  2022-07-01 16:08       ` Jonathan Cameron via
  1 sibling, 1 reply; 13+ messages in thread
From: Michael S. Tsirkin @ 2022-06-30 13:30 UTC (permalink / raw)
  To: Brice Goglin
  Cc: Igor Mammedov, QEMU Developers, Liu Jingqi, Eduardo Habkost,
	Marcel Apfelbaum, Philippe Mathieu-Daudé,
	Yanan Wang, Jonathan Cameron

On Thu, Jun 30, 2022 at 02:40:13PM +0200, Brice Goglin wrote:
> 
> Le 30/06/2022 à 14:23, Igor Mammedov a écrit :
> > On Thu, 30 Jun 2022 09:36:47 +0200
> > Brice Goglin <Brice.Goglin@inria.fr> wrote:
> > 
> > > Allow -numa without initiator value when hmat=on so that we may
> > > build more complex topologies, e.g. NUMA nodes whose best initiators
> > > are not just another single node.
> > > 
> > patches looks fine code-wise,
> > however something wrong with them, i.e. 'git am' doesn't like them
> > nor ./scripts/checkpatch (which one should use before sending patches).
> > 
> > I've checked it's not my mail server/client issue(or whatever)
> > that corrupts them (ones downloaded from patchew are broken as well)
> 
> 
> I don't know what's going on. These 4 patches are in
> https://github.com/bgoglin/qemu/commits/hmat-noinitiator (rebased on master
> 10mn ago).

It's the commit log that's corrupted.

> Do whatever you want with them. I am not allowed to spend more time on this.
> 
> Brice

Maybe someone will fix up the log and repost. One can hope ..

-- 
MST



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa
  2022-06-30 13:30     ` Michael S. Tsirkin
@ 2022-07-01 16:08       ` Jonathan Cameron via
  2022-07-04  9:07         ` Igor Mammedov
  0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Cameron via @ 2022-07-01 16:08 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Brice Goglin, Igor Mammedov, QEMU Developers, Liu Jingqi,
	Eduardo Habkost, Marcel Apfelbaum, Philippe Mathieu-Daudé,
	Yanan Wang, hesham.almatary

On Thu, 30 Jun 2022 09:30:58 -0400
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Thu, Jun 30, 2022 at 02:40:13PM +0200, Brice Goglin wrote:
> > 
> > Le 30/06/2022 à 14:23, Igor Mammedov a écrit :  
> > > On Thu, 30 Jun 2022 09:36:47 +0200
> > > Brice Goglin <Brice.Goglin@inria.fr> wrote:
> > >   
> > > > Allow -numa without initiator value when hmat=on so that we may
> > > > build more complex topologies, e.g. NUMA nodes whose best initiators
> > > > are not just another single node.
> > > >   
> > > patches looks fine code-wise,
> > > however something wrong with them, i.e. 'git am' doesn't like them
> > > nor ./scripts/checkpatch (which one should use before sending patches).
> > > 
> > > I've checked it's not my mail server/client issue(or whatever)
> > > that corrupts them (ones downloaded from patchew are broken as well)  
> > 
> > 
> > I don't know what's going on. These 4 patches are in
> > https://github.com/bgoglin/qemu/commits/hmat-noinitiator (rebased on master
> > 10mn ago).  
> 
> It's the commit log that's corrupted.
> 
> > Do whatever you want with them. I am not allowed to spend more time on this.
> > 
> > Brice  
> 
> Maybe someone will fix up the log and repost. One can hope ..
> 

We are planning to send out arm/virt support shortly including a similar test
that uses this series.  So if no one else gets to it before hand we'll include
fixed up version of Brice's series with that.

Jonathan


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa
  2022-07-01 16:08       ` Jonathan Cameron via
@ 2022-07-04  9:07         ` Igor Mammedov
  0 siblings, 0 replies; 13+ messages in thread
From: Igor Mammedov @ 2022-07-04  9:07 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Michael S. Tsirkin, Brice Goglin, QEMU Developers, Liu Jingqi,
	Eduardo Habkost, Marcel Apfelbaum, Philippe Mathieu-Daudé,
	Yanan Wang, hesham.almatary

On Fri, 1 Jul 2022 17:08:48 +0100
Jonathan Cameron <Jonathan.Cameron@huawei.com> wrote:

> On Thu, 30 Jun 2022 09:30:58 -0400
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > On Thu, Jun 30, 2022 at 02:40:13PM +0200, Brice Goglin wrote:  
> > > 
> > > Le 30/06/2022 à 14:23, Igor Mammedov a écrit :    
> > > > On Thu, 30 Jun 2022 09:36:47 +0200
> > > > Brice Goglin <Brice.Goglin@inria.fr> wrote:
> > > >     
> > > > > Allow -numa without initiator value when hmat=on so that we may
> > > > > build more complex topologies, e.g. NUMA nodes whose best initiators
> > > > > are not just another single node.
> > > > >     
> > > > patches looks fine code-wise,
> > > > however something wrong with them, i.e. 'git am' doesn't like them
> > > > nor ./scripts/checkpatch (which one should use before sending patches).
> > > > 
> > > > I've checked it's not my mail server/client issue(or whatever)
> > > > that corrupts them (ones downloaded from patchew are broken as well)    
> > > 
> > > 
> > > I don't know what's going on. These 4 patches are in
> > > https://github.com/bgoglin/qemu/commits/hmat-noinitiator (rebased on master
> > > 10mn ago).    
> > 
> > It's the commit log that's corrupted.
> >   
> > > Do whatever you want with them. I am not allowed to spend more time on this.
> > > 
> > > Brice    
> > 
> > Maybe someone will fix up the log and repost. One can hope ..
> >   
> 
> We are planning to send out arm/virt support shortly including a similar test
> that uses this series.  So if no one else gets to it before hand we'll include
> fixed up version of Brice's series with that.

Looking at headers, it looks like patches where sent with Thunderbird
which may corrupted patches (unless special care was taken).
If one would've used 'git send-email', it is likely patches would be fine.


> 
> Jonathan
> 



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-07-04  9:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30  7:36 [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa Brice Goglin
2022-06-30  7:40 ` [PATCH v4 1/4] " Brice Goglin
2022-06-30 13:28   ` Michael S. Tsirkin
2022-06-30  7:40 ` [PATCH v4 2/4] tests: acpi: add and whitelist *.hmat-noinitiator expected blobs Brice Goglin
2022-06-30  7:41 ` [PATCH v4 3/4] tests: acpi: q35: add test for hmat nodes without initiators Brice Goglin
2022-06-30  7:41 ` [PATCH v4 4/4] tests: acpi: q35: update expected blobs *.hmat-noinitiators Brice Goglin
2022-06-30 12:23 ` [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa Igor Mammedov
2022-06-30 12:40   ` Brice Goglin
2022-06-30 12:56     ` Igor Mammedov
2022-06-30 13:29       ` Michael S. Tsirkin
2022-06-30 13:30     ` Michael S. Tsirkin
2022-07-01 16:08       ` Jonathan Cameron via
2022-07-04  9:07         ` Igor Mammedov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.