Skip to contentSkip to conversation

Only generate cluster node in PPTT when specified

PATCH Superseded Yicong Yang via 2 participants 14 messages Sep 22, 2022 – Oct 27, 2022

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

cover Only generate cluster node in PPTT when specified

From: Yicong Yang <[email protected]>

This series mainly change the policy for building a cluster topology node in PPTT. Previously we'll always build a cluster node in PPTT without asking the user, after this set the cluster node will be built only the the user specify through "-smp clusters=X".

Update the tests and test tables accordingly.

Yicong Yang (4):
hw/acpi/aml-build: Only generate cluster node in PPTT when specified
tests: virt: update expected ACPI tables for virt test
tests: acpi: aarch64: add topology test for aarch64
tests: acpi: aarch64: add *.topology tables

 hw/acpi/aml-build.c                |   2 +-
 hw/core/machine-smp.c              |   3 +++
 include/hw/boards.h                |   2 ++
 tests/data/acpi/virt/APIC.pxb      | Bin 0 -> 168 bytes
 tests/data/acpi/virt/APIC.topology | Bin 0 -> 700 bytes
 tests/data/acpi/virt/DBG2.memhp    | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.numamem  | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.pxb      | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.topology | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DSDT.topology | Bin 0 -> 5398 bytes
 tests/data/acpi/virt/FACP.pxb      | Bin 0 -> 268 bytes
 tests/data/acpi/virt/FACP.topology | Bin 0 -> 268 bytes
 tests/data/acpi/virt/GTDT.pxb      | Bin 0 -> 96 bytes
 tests/data/acpi/virt/GTDT.topology | Bin 0 -> 96 bytes
 tests/data/acpi/virt/IORT.topology | Bin 0 -> 128 bytes
 tests/data/acpi/virt/MCFG.pxb      | Bin 0 -> 60 bytes
 tests/data/acpi/virt/MCFG.topology | Bin 0 -> 60 bytes
 tests/data/acpi/virt/PPTT          | Bin 96 -> 76 bytes
 tests/data/acpi/virt/PPTT.memhp    | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.numamem  | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.pxb      | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.topology | Bin 0 -> 336 bytes
 tests/data/acpi/virt/SPCR.pxb      | Bin 0 -> 80 bytes
 tests/data/acpi/virt/SPCR.topology | Bin 0 -> 80 bytes
 tests/qtest/bios-tables-test.c     |  22 ++++++++++++++++++++++
 25 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 tests/data/acpi/virt/APIC.pxb
 create mode 100644 tests/data/acpi/virt/APIC.topology
 create mode 100644 tests/data/acpi/virt/DBG2.memhp
 create mode 100644 tests/data/acpi/virt/DBG2.numamem
 create mode 100644 tests/data/acpi/virt/DBG2.pxb
 create mode 100644 tests/data/acpi/virt/DBG2.topology
 create mode 100644 tests/data/acpi/virt/DSDT.topology
 create mode 100644 tests/data/acpi/virt/FACP.pxb
 create mode 100644 tests/data/acpi/virt/FACP.topology
 create mode 100644 tests/data/acpi/virt/GTDT.pxb
 create mode 100644 tests/data/acpi/virt/GTDT.topology
 create mode 100644 tests/data/acpi/virt/IORT.topology
 create mode 100644 tests/data/acpi/virt/MCFG.pxb
 create mode 100644 tests/data/acpi/virt/MCFG.topology
 create mode 100644 tests/data/acpi/virt/PPTT.memhp
 create mode 100644 tests/data/acpi/virt/PPTT.numamem
 create mode 100644 tests/data/acpi/virt/PPTT.pxb
 create mode 100644 tests/data/acpi/virt/PPTT.topology
 create mode 100644 tests/data/acpi/virt/SPCR.pxb
 create mode 100644 tests/data/acpi/virt/SPCR.topology
Signature · 1 line
2.24.0
#1 lore raw

PATCH 1/4 hw/acpi/aml-build: Only generate cluster node in PPTT when specified

From: Yicong Yang <[email protected]>

Currently we'll always generate a cluster node no matter user has specified '-smp clusters=X' or not. Cluster is an optional level and it's unncessary to build it if user don't need. So only generate it when user specify explicitly.

Also update the test ACPI tables.

---
 hw/acpi/aml-build.c   | 2 +-
 hw/core/machine-smp.c | 3 +++
 include/hw/boards.h   | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)
hw/acpi/aml-build.c +1 -1
index e6bfac95c7..aab73af66d 100644
@@ -2030,7 +2030,7 @@ void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
                 0, socket_id, NULL, 0);
         }
 
-        if (mc->smp_props.clusters_supported) {
+        if (mc->smp_props.clusters_supported && ms->smp.build_cluster) {
             if (cpus->cpus[n].props.cluster_id != cluster_id) {
                 assert(cpus->cpus[n].props.cluster_id > cluster_id);
                 cluster_id = cpus->cpus[n].props.cluster_id;
hw/core/machine-smp.c +3 -0
index b39ed21e65..5d37e8d07a 100644
@@ -158,6 +158,9 @@ void machine_parse_smp_config(MachineState *ms,
     ms->smp.threads = threads;
     ms->smp.max_cpus = maxcpus;
 
+    if (config->has_clusters)
+        ms->smp.build_cluster = true;
+
     /* sanity-check of the computed topology */
     if (sockets * dies * clusters * cores * threads != maxcpus) {
         g_autofree char *topo_msg = cpu_hierarchy_to_string(ms);
include/hw/boards.h +2 -0
index 7b416c9787..24aafc213d 100644
@@ -305,6 +305,7 @@ typedef struct DeviceMemoryState {
  * @cores: the number of cores in one cluster
  * @threads: the number of threads in one core
  * @max_cpus: the maximum number of logical processors on the machine
+ * @build_cluster: build cluster topology or not
  */
 typedef struct CpuTopology {
     unsigned int cpus;
@@ -314,6 +315,7 @@ typedef struct CpuTopology {
     unsigned int cores;
     unsigned int threads;
     unsigned int max_cpus;
+    bool build_cluster;
 } CpuTopology;
 
 /**
Signature · 1 line
2.24.0
#2 lore raw

Re: [PATCH 1/4] hw/acpi/aml-build: Only generate cluster node in PPTT when specified

Quoted 10 lines · Yicong Yang

From: Yicong Yang <[email protected]>

Currently we'll always generate a cluster node no matter user has specified '-smp clusters=X' or not. Cluster is an optional level and it's unncessary to build it if user don't need. So only generate it when user specify explicitly.

Also update the test ACPI tables.

This is an example of a commit log repeating what the patch does. Which is ok but the important thing is to explain the motivation - why is it a bug to generate a cluster node without '-smp clusters'?

Quoted 55 lines
---
 hw/acpi/aml-build.c   | 2 +-
 hw/core/machine-smp.c | 3 +++
 include/hw/boards.h   | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)
hw/acpi/aml-build.c +1 -1
index e6bfac95c7..aab73af66d 100644
@@ -2030,7 +2030,7 @@ void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
                 0, socket_id, NULL, 0);
         }
 
-        if (mc->smp_props.clusters_supported) {
+        if (mc->smp_props.clusters_supported && ms->smp.build_cluster) {
             if (cpus->cpus[n].props.cluster_id != cluster_id) {
                 assert(cpus->cpus[n].props.cluster_id > cluster_id);
                 cluster_id = cpus->cpus[n].props.cluster_id;
hw/core/machine-smp.c +3 -0
index b39ed21e65..5d37e8d07a 100644
@@ -158,6 +158,9 @@ void machine_parse_smp_config(MachineState *ms,
     ms->smp.threads = threads;
     ms->smp.max_cpus = maxcpus;
 
+    if (config->has_clusters)
+        ms->smp.build_cluster = true;
+
     /* sanity-check of the computed topology */
     if (sockets * dies * clusters * cores * threads != maxcpus) {
         g_autofree char *topo_msg = cpu_hierarchy_to_string(ms);
include/hw/boards.h +2 -0
index 7b416c9787..24aafc213d 100644
@@ -305,6 +305,7 @@ typedef struct DeviceMemoryState {
  * @cores: the number of cores in one cluster
  * @threads: the number of threads in one core
  * @max_cpus: the maximum number of logical processors on the machine
+ * @build_cluster: build cluster topology or not
  */
 typedef struct CpuTopology {
     unsigned int cpus;
@@ -314,6 +315,7 @@ typedef struct CpuTopology {
     unsigned int cores;
     unsigned int threads;
     unsigned int max_cpus;
+    bool build_cluster;
 } CpuTopology;
 
 /**
Signature · 1 line
2.24.0
#3 lore raw

Re: [PATCH 1/4] hw/acpi/aml-build: Only generate cluster node in PPTT when specified

Quoted 8 lines · Michael S. Tsirkin
Quoted 7 lines · Yicong Yang

From: Yicong Yang <[email protected]>

Currently we'll always generate a cluster node no matter user has specified '-smp clusters=X' or not. Cluster is an optional level and it's unncessary to build it if user don't need. So only generate it when user specify explicitly.

Quoted 8 lines
Quoted 3 lines

Also update the test ACPI tables.

This is an example of a commit log repeating what the patch does. Which is ok but the important thing is to explain the motivation - why is it a bug to generate a cluster node without '-smp clusters'?

It may not be a bug but may build the unneeded topology unconsciously and doesn't provide a way to inhibit this. So I thought the policy can be improved.

Thanks.

Quoted 59 lines
Quoted 56 lines
---
 hw/acpi/aml-build.c   | 2 +-
 hw/core/machine-smp.c | 3 +++
 include/hw/boards.h   | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)
hw/acpi/aml-build.c +1 -1
index e6bfac95c7..aab73af66d 100644
@@ -2030,7 +2030,7 @@ void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
                 0, socket_id, NULL, 0);
         }
 
-        if (mc->smp_props.clusters_supported) {
+        if (mc->smp_props.clusters_supported && ms->smp.build_cluster) {
             if (cpus->cpus[n].props.cluster_id != cluster_id) {
                 assert(cpus->cpus[n].props.cluster_id > cluster_id);
                 cluster_id = cpus->cpus[n].props.cluster_id;
hw/core/machine-smp.c +3 -0
index b39ed21e65..5d37e8d07a 100644
@@ -158,6 +158,9 @@ void machine_parse_smp_config(MachineState *ms,
     ms->smp.threads = threads;
     ms->smp.max_cpus = maxcpus;
 
+    if (config->has_clusters)
+        ms->smp.build_cluster = true;
+
     /* sanity-check of the computed topology */
     if (sockets * dies * clusters * cores * threads != maxcpus) {
         g_autofree char *topo_msg = cpu_hierarchy_to_string(ms);
include/hw/boards.h +2 -0
index 7b416c9787..24aafc213d 100644
@@ -305,6 +305,7 @@ typedef struct DeviceMemoryState {
  * @cores: the number of cores in one cluster
  * @threads: the number of threads in one core
  * @max_cpus: the maximum number of logical processors on the machine
+ * @build_cluster: build cluster topology or not
  */
 typedef struct CpuTopology {
     unsigned int cpus;
@@ -314,6 +315,7 @@ typedef struct CpuTopology {
     unsigned int cores;
     unsigned int threads;
     unsigned int max_cpus;
+    bool build_cluster;
 } CpuTopology;
 
 /**
Signature · 1 line
2.24.0

.

#4 lore raw

Re: [PATCH 1/4] hw/acpi/aml-build: Only generate cluster node in PPTT when specified

In reply to Yicong Yang via

Hi Yicong,

Quoted 8 lines · Yicong Yang

From: Yicong Yang<[email protected]>

Currently we'll always generate a cluster node no matter user has specified '-smp clusters=X' or not. Cluster is an optional level and it's unncessary to build it if user don't need. So only generate it when user specify explicitly.

Also update the test ACPI tables.

It would be much more helpful to explain the problem you have met in practice without this patch. (maybe have some description or a link of the issue in the cover-letter if we need a v2).

In qemu which behaves as like a firmware vendor for VM, the ACPI PPTT is built based on the topology info produced by machine_parse_smp_config(). And machine_parse_smp_config will always calculate a complete topology hierarchy using its algorithm, if the user gives an incomplete -smp CLI.

I think there are two options for us to chose:
1) approach described in this patch
2) qemu will always generate a full topology hierarchy in PPTT with all the topo members it currently supports. While users need to consider the necessity to use an incomplete -smp or an complete one according to their specific scenario, and should be aware of the kernel behavior resulted from the config.

There is some Doc for users to explain how qemu will parse user-specified -smp in [1].
[1] https://www.mankier.com/1/qemu#Options

Thanks,
Yanan

Quoted 54 lines
---
  hw/acpi/aml-build.c   | 2 +-
  hw/core/machine-smp.c | 3 +++
  include/hw/boards.h   | 2 ++
  3 files changed, 6 insertions(+), 1 deletion(-)
hw/acpi/aml-build.c +1 -1
index e6bfac95c7..aab73af66d 100644
@@ -2030,7 +2030,7 @@ void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
                  0, socket_id, NULL, 0);
          }
 
-        if (mc->smp_props.clusters_supported) {
+        if (mc->smp_props.clusters_supported && ms->smp.build_cluster) {
              if (cpus->cpus[n].props.cluster_id != cluster_id) {
                  assert(cpus->cpus[n].props.cluster_id > cluster_id);
                  cluster_id = cpus->cpus[n].props.cluster_id;
hw/core/machine-smp.c +3 -0
index b39ed21e65..5d37e8d07a 100644
@@ -158,6 +158,9 @@ void machine_parse_smp_config(MachineState *ms,
      ms->smp.threads = threads;
      ms->smp.max_cpus = maxcpus;
 
+    if (config->has_clusters)
+        ms->smp.build_cluster = true;
+
      /* sanity-check of the computed topology */
      if (sockets * dies * clusters * cores * threads != maxcpus) {
          g_autofree char *topo_msg = cpu_hierarchy_to_string(ms);
include/hw/boards.h +2 -0
index 7b416c9787..24aafc213d 100644
@@ -305,6 +305,7 @@ typedef struct DeviceMemoryState {
   * @cores: the number of cores in one cluster
   * @threads: the number of threads in one core
   * @max_cpus: the maximum number of logical processors on the machine
+ * @build_cluster: build cluster topology or not
   */
  typedef struct CpuTopology {
      unsigned int cpus;
@@ -314,6 +315,7 @@ typedef struct CpuTopology {
      unsigned int cores;
      unsigned int threads;
      unsigned int max_cpus;
+    bool build_cluster;
  } CpuTopology;
 
  /**
#5 lore raw

Re: [PATCH 1/4] hw/acpi/aml-build: Only generate cluster node in PPTT when specified

Quoted 10 lines · wangyanan (Y)

Hi Yicong,

Quoted 7 lines · Yicong Yang

From: Yicong Yang<[email protected]>

Currently we'll always generate a cluster node no matter user has specified '-smp clusters=X' or not. Cluster is an optional level and it's unncessary to build it if user don't need. So only generate it when user specify explicitly.

Quoted 6 lines
Quoted 1 line

Also update the test ACPI tables.

It would be much more helpful to explain the problem you have met in practice without this patch. (maybe have some description or a link of the issue in the cover-letter if we need a v2).

My problem is related to this but not fully caused by this.

I found my schedule domains are not built as expected with command -smp 8 and 4 NUMA nodes. The final schedule domains built look like below with no NUMA domains built.

[    2.141316] CPU0 attaching sched-domain(s):
[    2.142558]  domain-0: span=0-7 level=MC
[    2.145364]   groups: 0:{ span=0 cap=964 }, 1:{ span=1 cap=914 }, 2:{ span=2 cap=921 }, 3:{ span=3 cap=964 }, 4:{ span=4 cap=925 }, 5:{ span=5 cap=964 }, 6:{ span=6 cap=967 }, 7:{ span=7 cap=967 }
[    2.158357] CPU1 attaching sched-domain(s):
[    2.158964]  domain-0: span=0-7 level=MC

should be:

[    2.008885] CPU0 attaching sched-domain(s):
[    2.009764]  domain-0: span=0-1 level=MC
[    2.012654]   groups: 0:{ span=0 cap=962 }, 1:{ span=1 cap=925 }
[    2.016532]   domain-1: span=0-3 level=NUMA
[    2.017444]    groups: 0:{ span=0-1 cap=1887 }, 2:{ span=2-3 cap=1871 }
[    2.019354]    domain-2: span=0-5 level=NUMA
[    2.019983]     groups: 0:{ span=0-3 cap=3758 }, 4:{ span=4-5 cap=1935 }
[    2.021527]     domain-3: span=0-7 level=NUMA
[    2.022516]      groups: 0:{ span=0-5 mask=0-1 cap=5693 }, 6:{ span=4-7 mask=6-7 cap=3978 }

[...]

It's because the MC level span extends to Cluster level which spans all the cpus in the system, then the schedule domain building stops at MC level since it already includes all the cpus.

It makes people confusing that cluster node is generated without asking for it.

A discussion for the problem:
https://lore.kernel.org/lkml/[email protected]/

Quoted 6 lines

In qemu which behaves as like a firmware vendor for VM, the ACPI PPTT is built based on the topology info produced by machine_parse_smp_config(). And machine_parse_smp_config will always calculate a complete topology hierarchy using its algorithm, if the user gives an incomplete -smp CLI.

Considering cluster is an optional level and most platforms don't have it, they may even don't realize this is built and a always build policy cannot emulate the topology on these platforms. Also it may influences the build of schedule domains uncousiously in some cases so...

Quoted 9 lines

I think there are two options for us to chose:
1) approach described in this patch
2) qemu will always generate a full topology hierarchy in PPTT with all the topo members it currently supports. While users need to consider the necessity to use an incomplete -smp or an complete one according to their specific scenario, and should be aware of the kernel behavior resulted from the config.

...I'd prefer 1) then users can generate this *only* when they explicitly know what they want and what they'll get. A full topology hierachy generation lacks flexibility. Any thought?

Quoted 4 lines

There is some Doc for users to explain how qemu will parse user-specified -smp in [1].
[1] https://www.mankier.com/1/qemu#Options

Thanks!
Yicong

Quoted 55 lines

Thanks,
Yanan

Quoted 45 lines

---
  hw/acpi/aml-build.c   | 2 +-
  hw/core/machine-smp.c | 3 +++
  include/hw/boards.h   | 2 ++

  3 files changed, 6 insertions(+), 1 deletion(-)
hw/acpi/aml-build.c +1 -0
index e6bfac95c7..aab73af66d 100644
@@ -2030,7 +2030,7 @@ void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
                   0, socket_id, NULL, 0);
           }
   -        if (mc->smp_props.clusters_supported) {
+        if (mc->smp_props.clusters_supported && ms->smp.build_cluster) {
               if (cpus->cpus[n].props.cluster_id != cluster_id) {
                   assert(cpus->cpus[n].props.cluster_id > cluster_id);
                   cluster_id = cpus->cpus[n].props.cluster_id;
hw/core/machine-smp.c +2 -0
index b39ed21e65..5d37e8d07a 100644
@@ -158,6 +158,9 @@ void machine_parse_smp_config(MachineState *ms,
       ms->smp.threads = threads;
       ms->smp.max_cpus = maxcpus;
   +    if (config->has_clusters)
+        ms->smp.build_cluster = true;
+
       /* sanity-check of the computed topology */
       if (sockets * dies * clusters * cores * threads != maxcpus) {
           g_autofree char *topo_msg = cpu_hierarchy_to_string(ms);
include/hw/boards.h +1 -0
index 7b416c9787..24aafc213d 100644
@@ -305,6 +305,7 @@ typedef struct DeviceMemoryState {
    * @cores: the number of cores in one cluster
    * @threads: the number of threads in one core
    * @max_cpus: the maximum number of logical processors on the machine
+ * @build_cluster: build cluster topology or not
    */
   typedef struct CpuTopology {
       unsigned int cpus;

include/hw/boards.h typedef struct CpuTopology { · line 320

Quoted 6 lines
include/hw/boards.h +1 -0
@@ -314,6 +315,7 @@ typedef struct CpuTopology {
       unsigned int cores;
       unsigned int threads;
       unsigned int max_cpus;
+    bool build_cluster;
   } CpuTopology;
     /**

.

#6 lore raw

PATCH 2/4 tests: virt: update expected ACPI tables for virt test

In reply to Yicong Yang via

From: Yicong Yang <[email protected]>

Update the ACPI tables according to the acpi aml_build change.

---
 tests/data/acpi/virt/APIC.pxb     | Bin 0 -> 168 bytes
 tests/data/acpi/virt/DBG2.memhp   | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.numamem | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.pxb     | Bin 0 -> 87 bytes
 tests/data/acpi/virt/FACP.pxb     | Bin 0 -> 268 bytes
 tests/data/acpi/virt/GTDT.pxb     | Bin 0 -> 96 bytes
 tests/data/acpi/virt/MCFG.pxb     | Bin 0 -> 60 bytes
 tests/data/acpi/virt/PPTT         | Bin 96 -> 76 bytes
 tests/data/acpi/virt/PPTT.memhp   | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.numamem | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.pxb     | Bin 0 -> 76 bytes
 tests/data/acpi/virt/SPCR.pxb     | Bin 0 -> 80 bytes
 12 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 tests/data/acpi/virt/APIC.pxb
 create mode 100644 tests/data/acpi/virt/DBG2.memhp
 create mode 100644 tests/data/acpi/virt/DBG2.numamem
 create mode 100644 tests/data/acpi/virt/DBG2.pxb
 create mode 100644 tests/data/acpi/virt/FACP.pxb
 create mode 100644 tests/data/acpi/virt/GTDT.pxb
 create mode 100644 tests/data/acpi/virt/MCFG.pxb
 create mode 100644 tests/data/acpi/virt/PPTT.memhp
 create mode 100644 tests/data/acpi/virt/PPTT.numamem
 create mode 100644 tests/data/acpi/virt/PPTT.pxb
 create mode 100644 tests/data/acpi/virt/SPCR.pxb
tests/data/acpi/virt/APIC.pxb new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..023f15f12e74fb9a3a6d3d9dc994541016947d6a
GIT binary patch
tests/data/acpi/virt/DBG2.memhp new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..86e6314f7b0235ef8ed3e0221e09f996c41f5e98
GIT binary patch
tests/data/acpi/virt/DBG2.numamem new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..86e6314f7b0235ef8ed3e0221e09f996c41f5e98
GIT binary patch
tests/data/acpi/virt/DBG2.pxb new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..86e6314f7b0235ef8ed3e0221e09f996c41f5e98
GIT binary patch
tests/data/acpi/virt/FACP.pxb new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..1f764220f8533c427168e80ccf298604826a00b4
GIT binary patch
tests/data/acpi/virt/GTDT.pxb new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..9408b71b59c0e0f2991c0053562280155b47bc0b
GIT binary patch
tests/data/acpi/virt/MCFG.pxb new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..f4ae3203a4e9258a397c9912332178640209637b
GIT binary patch
tests/data/acpi/virt/PPTT binary +0 -0
index f56ea63b369a604877374ad696c396e796ab1c83..7a1258ecf123555b24462c98ccbb76b4ac1d0c2b 100644
GIT binary patch
tests/data/acpi/virt/PPTT.memhp new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..7a1258ecf123555b24462c98ccbb76b4ac1d0c2b
GIT binary patch
tests/data/acpi/virt/PPTT.numamem new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..7a1258ecf123555b24462c98ccbb76b4ac1d0c2b
GIT binary patch
tests/data/acpi/virt/PPTT.pxb new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..7a1258ecf123555b24462c98ccbb76b4ac1d0c2b
GIT binary patch
tests/data/acpi/virt/SPCR.pxb new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..24e0a579e7d73f432a614380e29aa95113344186
GIT binary patch
Signature · 1 line
2.24.0
#7 lore raw

PATCH 3/4 tests: acpi: aarch64: add topology test for aarch64

In reply to Yicong Yang via

From: Yicong Yang <[email protected]>

Add test for aarch64's ACPI topology building for all the supported levels.

---
 tests/qtest/bios-tables-test.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
tests/qtest/bios-tables-test.c +22 -0
index 7c5f736b51..8579b43491 100644
@@ -1531,6 +1531,27 @@ static void test_acpi_virt_tcg(void)
     free_test_data(&data);
 }
 
+static void test_acpi_virt_tcg_topology(void)
+{
+    test_data data = {
+        .machine = "virt",
+        .variant = ".topology",
+        .tcg_only = true,
+        .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
+        .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
+        .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
+        .ram_start = 0x40000000ULL,
+        .scan_len = 128ULL * 1024 * 1024,
+    };
+
+    data.smbios_cpu_max_speed = 2900;
+    data.smbios_cpu_curr_speed = 2700;
+    test_acpi_one("-cpu cortex-a57 "
+                  "-smbios type=4,max-speed=2900,current-speed=2700 "
+                  "-smp sockets=1,clusters=2,cores=2,threads=2", &data);
+    free_test_data(&data);
+}
+
 static void test_acpi_q35_viot(void)
 {
     test_data data = {
@@ -1831,6 +1852,7 @@ int main(int argc, char *argv[])
     } else if (strcmp(arch, "aarch64") == 0) {
         if (has_tcg) {
             qtest_add_func("acpi/virt", test_acpi_virt_tcg);
+            qtest_add_func("acpi/virt/topology", test_acpi_virt_tcg_topology);
             qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem);
             qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp);
             qtest_add_func("acpi/virt/pxb", test_acpi_virt_tcg_pxb);
Signature · 1 line
2.24.0
#8 lore raw

PATCH 4/4 tests: acpi: aarch64: add *.topology tables

In reply to Yicong Yang via

From: Yicong Yang <[email protected]>

Add *.topology tables for the aarch64's topology test.

---
 tests/data/acpi/virt/APIC.topology | Bin 0 -> 700 bytes
 tests/data/acpi/virt/DBG2.topology | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DSDT.topology | Bin 0 -> 5398 bytes
 tests/data/acpi/virt/FACP.topology | Bin 0 -> 268 bytes
 tests/data/acpi/virt/GTDT.topology | Bin 0 -> 96 bytes
 tests/data/acpi/virt/IORT.topology | Bin 0 -> 128 bytes
 tests/data/acpi/virt/MCFG.topology | Bin 0 -> 60 bytes
 tests/data/acpi/virt/PPTT.topology | Bin 0 -> 336 bytes
 tests/data/acpi/virt/SPCR.topology | Bin 0 -> 80 bytes
 9 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 tests/data/acpi/virt/APIC.topology
 create mode 100644 tests/data/acpi/virt/DBG2.topology
 create mode 100644 tests/data/acpi/virt/DSDT.topology
 create mode 100644 tests/data/acpi/virt/FACP.topology
 create mode 100644 tests/data/acpi/virt/GTDT.topology
 create mode 100644 tests/data/acpi/virt/IORT.topology
 create mode 100644 tests/data/acpi/virt/MCFG.topology
 create mode 100644 tests/data/acpi/virt/PPTT.topology
 create mode 100644 tests/data/acpi/virt/SPCR.topology
tests/data/acpi/virt/APIC.topology new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..558a1856981531b0e18e6d4aa12569cd80aa0015
GIT binary patch
tests/data/acpi/virt/DBG2.topology new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..86e6314f7b0235ef8ed3e0221e09f996c41f5e98
GIT binary patch
tests/data/acpi/virt/DSDT.topology new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..501314c91be01d927fd125e0c72e919fdd85592e
GIT binary patch
tests/data/acpi/virt/FACP.topology new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..1f764220f8533c427168e80ccf298604826a00b4
GIT binary patch
tests/data/acpi/virt/GTDT.topology new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..9408b71b59c0e0f2991c0053562280155b47bc0b
GIT binary patch
tests/data/acpi/virt/IORT.topology new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..7efd0ce8a6b3928efa7e1373f688ab4c5f50543b
GIT binary patch
tests/data/acpi/virt/MCFG.topology new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..f4ae3203a4e9258a397c9912332178640209637b
GIT binary patch
tests/data/acpi/virt/PPTT.topology new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..3fbcae5ff08aaf16fedf4da45e941661d79c1174
GIT binary patch
tests/data/acpi/virt/SPCR.topology new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..24e0a579e7d73f432a614380e29aa95113344186
GIT binary patch
Signature · 1 line
2.24.0
#9 lore raw
In reply to Yicong Yang via
Quoted 8 lines · On Thu, 22 Sep 2022 21:11:39 +0800 Yicong Yang <[email protected]> wrote:

From: Yicong Yang <[email protected]>

This series mainly change the policy for building a cluster topology node in PPTT. Previously we'll always build a cluster node in PPTT without asking the user, after this set the cluster node will be built only the the user specify through "-smp clusters=X".

Update the tests and test tables accordingly.

Hi Yicong,

Does this bring an issue with backwards compatibility? I'm assuming we need to make this something controlled in virt_machine_7_1_options()?

One of those things we probably should have noticed originally but now we are stuck with the slightly messy backwards compatibility problem.

Also, looks like you picked up a bunch of tables that are unrelated to the change.

Jonathan

Quoted 55 lines

Yicong Yang (4):
hw/acpi/aml-build: Only generate cluster node in PPTT when specified
tests: virt: update expected ACPI tables for virt test
tests: acpi: aarch64: add topology test for aarch64
tests: acpi: aarch64: add *.topology tables

 hw/acpi/aml-build.c                |   2 +-
 hw/core/machine-smp.c              |   3 +++
 include/hw/boards.h                |   2 ++
 tests/data/acpi/virt/APIC.pxb      | Bin 0 -> 168 bytes
 tests/data/acpi/virt/APIC.topology | Bin 0 -> 700 bytes
 tests/data/acpi/virt/DBG2.memhp    | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.numamem  | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.pxb      | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.topology | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DSDT.topology | Bin 0 -> 5398 bytes
 tests/data/acpi/virt/FACP.pxb      | Bin 0 -> 268 bytes
 tests/data/acpi/virt/FACP.topology | Bin 0 -> 268 bytes
 tests/data/acpi/virt/GTDT.pxb      | Bin 0 -> 96 bytes
 tests/data/acpi/virt/GTDT.topology | Bin 0 -> 96 bytes
 tests/data/acpi/virt/IORT.topology | Bin 0 -> 128 bytes
 tests/data/acpi/virt/MCFG.pxb      | Bin 0 -> 60 bytes
 tests/data/acpi/virt/MCFG.topology | Bin 0 -> 60 bytes
 tests/data/acpi/virt/PPTT          | Bin 96 -> 76 bytes
 tests/data/acpi/virt/PPTT.memhp    | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.numamem  | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.pxb      | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.topology | Bin 0 -> 336 bytes
 tests/data/acpi/virt/SPCR.pxb      | Bin 0 -> 80 bytes
 tests/data/acpi/virt/SPCR.topology | Bin 0 -> 80 bytes
 tests/qtest/bios-tables-test.c     |  22 ++++++++++++++++++++++
 25 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 tests/data/acpi/virt/APIC.pxb
 create mode 100644 tests/data/acpi/virt/APIC.topology
 create mode 100644 tests/data/acpi/virt/DBG2.memhp
 create mode 100644 tests/data/acpi/virt/DBG2.numamem
 create mode 100644 tests/data/acpi/virt/DBG2.pxb
 create mode 100644 tests/data/acpi/virt/DBG2.topology
 create mode 100644 tests/data/acpi/virt/DSDT.topology
 create mode 100644 tests/data/acpi/virt/FACP.pxb
 create mode 100644 tests/data/acpi/virt/FACP.topology
 create mode 100644 tests/data/acpi/virt/GTDT.pxb
 create mode 100644 tests/data/acpi/virt/GTDT.topology
 create mode 100644 tests/data/acpi/virt/IORT.topology
 create mode 100644 tests/data/acpi/virt/MCFG.pxb
 create mode 100644 tests/data/acpi/virt/MCFG.topology
 create mode 100644 tests/data/acpi/virt/PPTT.memhp
 create mode 100644 tests/data/acpi/virt/PPTT.numamem
 create mode 100644 tests/data/acpi/virt/PPTT.pxb
 create mode 100644 tests/data/acpi/virt/PPTT.topology
 create mode 100644 tests/data/acpi/virt/SPCR.pxb
 create mode 100644 tests/data/acpi/virt/SPCR.topology
#10 lore raw
Quoted 5 lines · Jonathan Cameron
Quoted 2 lines · On Thu, 22 Sep 2022 21:11:39 +0800 Yicong Yang <[email protected]> wrote:

From: Yicong Yang <[email protected]>

Quoted 7 lines
Quoted 6 lines

This series mainly change the policy for building a cluster topology node in PPTT. Previously we'll always build a cluster node in PPTT without asking the user, after this set the cluster node will be built only the the user specify through "-smp clusters=X".

Update the tests and test tables accordingly.

Hi Yicong,

Hi Jonathan,

Thanks for the comments!

Quoted 5 lines

Does this bring an issue with backwards compatibility? I'm assuming we need to make this something controlled in virt_machine_7_1_options()?

I'm not sure but I cannot come up with one for now. Any hints for this? Maybe Yanan can shed some light on this since they are using this cluster feature.

Quoted 6 lines

One of those things we probably should have noticed originally but now we are stuck with the slightly messy backwards compatibility problem.

Also, looks like you picked up a bunch of tables that are unrelated to the change.

The tables are updated by tests/data/acpi/rebuild-expected-aml.sh so I think it's doing the proper thing. These tables are introduced due to:

Patch 1 - Don't build the cluster node by default, so the "virt" test is influenced Patch 2 - Update the expected PPTT table to get rid of the cluster node Patch 3 - Since the cluster is not tested, add a new test for topology test of all
level for aarch64, with command "-smp sockets=1,clusters=2,cores=2,threads=2"
Patch 4 - Update the expected tables for the topology test introduced in Patch 3

Quoted 61 lines

Jonathan

Quoted 46 lines

Yicong Yang (4):
hw/acpi/aml-build: Only generate cluster node in PPTT when specified
tests: virt: update expected ACPI tables for virt test
tests: acpi: aarch64: add topology test for aarch64
tests: acpi: aarch64: add *.topology tables

 hw/acpi/aml-build.c                |   2 +-
 hw/core/machine-smp.c              |   3 +++
 include/hw/boards.h                |   2 ++
 tests/data/acpi/virt/APIC.pxb      | Bin 0 -> 168 bytes
 tests/data/acpi/virt/APIC.topology | Bin 0 -> 700 bytes
 tests/data/acpi/virt/DBG2.memhp    | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.numamem  | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.pxb      | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.topology | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DSDT.topology | Bin 0 -> 5398 bytes
 tests/data/acpi/virt/FACP.pxb      | Bin 0 -> 268 bytes
 tests/data/acpi/virt/FACP.topology | Bin 0 -> 268 bytes
 tests/data/acpi/virt/GTDT.pxb      | Bin 0 -> 96 bytes
 tests/data/acpi/virt/GTDT.topology | Bin 0 -> 96 bytes
 tests/data/acpi/virt/IORT.topology | Bin 0 -> 128 bytes
 tests/data/acpi/virt/MCFG.pxb      | Bin 0 -> 60 bytes
 tests/data/acpi/virt/MCFG.topology | Bin 0 -> 60 bytes
 tests/data/acpi/virt/PPTT          | Bin 96 -> 76 bytes
 tests/data/acpi/virt/PPTT.memhp    | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.numamem  | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.pxb      | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.topology | Bin 0 -> 336 bytes
 tests/data/acpi/virt/SPCR.pxb      | Bin 0 -> 80 bytes
 tests/data/acpi/virt/SPCR.topology | Bin 0 -> 80 bytes
 tests/qtest/bios-tables-test.c     |  22 ++++++++++++++++++++++
 25 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 tests/data/acpi/virt/APIC.pxb
 create mode 100644 tests/data/acpi/virt/APIC.topology
 create mode 100644 tests/data/acpi/virt/DBG2.memhp
 create mode 100644 tests/data/acpi/virt/DBG2.numamem
 create mode 100644 tests/data/acpi/virt/DBG2.pxb
 create mode 100644 tests/data/acpi/virt/DBG2.topology
 create mode 100644 tests/data/acpi/virt/DSDT.topology
 create mode 100644 tests/data/acpi/virt/FACP.pxb
 create mode 100644 tests/data/acpi/virt/FACP.topology
 create mode 100644 tests/data/acpi/virt/GTDT.pxb
 create mode 100644 tests/data/acpi/virt/GTDT.topology
 create mode 100644 tests/data/acpi/virt/IORT.topology
Quoted 9 lines
 create mode 100644 tests/data/acpi/virt/MCFG.pxb
 create mode 100644 tests/data/acpi/virt/MCFG.topology
 create mode 100644 tests/data/acpi/virt/PPTT.memhp
 create mode 100644 tests/data/acpi/virt/PPTT.numamem
 create mode 100644 tests/data/acpi/virt/PPTT.pxb
 create mode 100644 tests/data/acpi/virt/PPTT.topology
 create mode 100644 tests/data/acpi/virt/SPCR.pxb
 create mode 100644 tests/data/acpi/virt/SPCR.topology

.

#11 lore raw
In reply to Yicong Yang via
Quoted 8 lines · Yicong Yang

From: Yicong Yang <[email protected]>

This series mainly change the policy for building a cluster topology node in PPTT. Previously we'll always build a cluster node in PPTT without asking the user, after this set the cluster node will be built only the the user specify through "-smp clusters=X".

Update the tests and test tables accordingly.

Given it's virt machine only, I'd like an ack from relevant maintainers.

Quoted 55 lines

Yicong Yang (4):
hw/acpi/aml-build: Only generate cluster node in PPTT when specified
tests: virt: update expected ACPI tables for virt test
tests: acpi: aarch64: add topology test for aarch64
tests: acpi: aarch64: add *.topology tables

 hw/acpi/aml-build.c                |   2 +-
 hw/core/machine-smp.c              |   3 +++
 include/hw/boards.h                |   2 ++
 tests/data/acpi/virt/APIC.pxb      | Bin 0 -> 168 bytes
 tests/data/acpi/virt/APIC.topology | Bin 0 -> 700 bytes
 tests/data/acpi/virt/DBG2.memhp    | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.numamem  | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.pxb      | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.topology | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DSDT.topology | Bin 0 -> 5398 bytes
 tests/data/acpi/virt/FACP.pxb      | Bin 0 -> 268 bytes
 tests/data/acpi/virt/FACP.topology | Bin 0 -> 268 bytes
 tests/data/acpi/virt/GTDT.pxb      | Bin 0 -> 96 bytes
 tests/data/acpi/virt/GTDT.topology | Bin 0 -> 96 bytes
 tests/data/acpi/virt/IORT.topology | Bin 0 -> 128 bytes
 tests/data/acpi/virt/MCFG.pxb      | Bin 0 -> 60 bytes
 tests/data/acpi/virt/MCFG.topology | Bin 0 -> 60 bytes
 tests/data/acpi/virt/PPTT          | Bin 96 -> 76 bytes
 tests/data/acpi/virt/PPTT.memhp    | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.numamem  | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.pxb      | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.topology | Bin 0 -> 336 bytes
 tests/data/acpi/virt/SPCR.pxb      | Bin 0 -> 80 bytes
 tests/data/acpi/virt/SPCR.topology | Bin 0 -> 80 bytes
 tests/qtest/bios-tables-test.c     |  22 ++++++++++++++++++++++
 25 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 tests/data/acpi/virt/APIC.pxb
 create mode 100644 tests/data/acpi/virt/APIC.topology
 create mode 100644 tests/data/acpi/virt/DBG2.memhp
 create mode 100644 tests/data/acpi/virt/DBG2.numamem
 create mode 100644 tests/data/acpi/virt/DBG2.pxb
 create mode 100644 tests/data/acpi/virt/DBG2.topology
 create mode 100644 tests/data/acpi/virt/DSDT.topology
 create mode 100644 tests/data/acpi/virt/FACP.pxb
 create mode 100644 tests/data/acpi/virt/FACP.topology
 create mode 100644 tests/data/acpi/virt/GTDT.pxb
 create mode 100644 tests/data/acpi/virt/GTDT.topology
 create mode 100644 tests/data/acpi/virt/IORT.topology
 create mode 100644 tests/data/acpi/virt/MCFG.pxb
 create mode 100644 tests/data/acpi/virt/MCFG.topology
 create mode 100644 tests/data/acpi/virt/PPTT.memhp
 create mode 100644 tests/data/acpi/virt/PPTT.numamem
 create mode 100644 tests/data/acpi/virt/PPTT.pxb
 create mode 100644 tests/data/acpi/virt/PPTT.topology
 create mode 100644 tests/data/acpi/virt/SPCR.pxb
 create mode 100644 tests/data/acpi/virt/SPCR.topology
Signature · 1 line
2.24.0
#12 lore raw
In reply to Yicong Yang via
Quoted 8 lines · Yicong Yang

From: Yicong Yang <[email protected]>

This series mainly change the policy for building a cluster topology node in PPTT. Previously we'll always build a cluster node in PPTT without asking the user, after this set the cluster node will be built only the the user specify through "-smp clusters=X".

Update the tests and test tables accordingly.

This will need an ack from virt maintainers.

And I think what people are asking is about the impact of this patch on guests.

Quoted 55 lines

Yicong Yang (4):
hw/acpi/aml-build: Only generate cluster node in PPTT when specified
tests: virt: update expected ACPI tables for virt test
tests: acpi: aarch64: add topology test for aarch64
tests: acpi: aarch64: add *.topology tables

 hw/acpi/aml-build.c                |   2 +-
 hw/core/machine-smp.c              |   3 +++
 include/hw/boards.h                |   2 ++
 tests/data/acpi/virt/APIC.pxb      | Bin 0 -> 168 bytes
 tests/data/acpi/virt/APIC.topology | Bin 0 -> 700 bytes
 tests/data/acpi/virt/DBG2.memhp    | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.numamem  | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.pxb      | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.topology | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DSDT.topology | Bin 0 -> 5398 bytes
 tests/data/acpi/virt/FACP.pxb      | Bin 0 -> 268 bytes
 tests/data/acpi/virt/FACP.topology | Bin 0 -> 268 bytes
 tests/data/acpi/virt/GTDT.pxb      | Bin 0 -> 96 bytes
 tests/data/acpi/virt/GTDT.topology | Bin 0 -> 96 bytes
 tests/data/acpi/virt/IORT.topology | Bin 0 -> 128 bytes
 tests/data/acpi/virt/MCFG.pxb      | Bin 0 -> 60 bytes
 tests/data/acpi/virt/MCFG.topology | Bin 0 -> 60 bytes
 tests/data/acpi/virt/PPTT          | Bin 96 -> 76 bytes
 tests/data/acpi/virt/PPTT.memhp    | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.numamem  | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.pxb      | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.topology | Bin 0 -> 336 bytes
 tests/data/acpi/virt/SPCR.pxb      | Bin 0 -> 80 bytes
 tests/data/acpi/virt/SPCR.topology | Bin 0 -> 80 bytes
 tests/qtest/bios-tables-test.c     |  22 ++++++++++++++++++++++
 25 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 tests/data/acpi/virt/APIC.pxb
 create mode 100644 tests/data/acpi/virt/APIC.topology
 create mode 100644 tests/data/acpi/virt/DBG2.memhp
 create mode 100644 tests/data/acpi/virt/DBG2.numamem
 create mode 100644 tests/data/acpi/virt/DBG2.pxb
 create mode 100644 tests/data/acpi/virt/DBG2.topology
 create mode 100644 tests/data/acpi/virt/DSDT.topology
 create mode 100644 tests/data/acpi/virt/FACP.pxb
 create mode 100644 tests/data/acpi/virt/FACP.topology
 create mode 100644 tests/data/acpi/virt/GTDT.pxb
 create mode 100644 tests/data/acpi/virt/GTDT.topology
 create mode 100644 tests/data/acpi/virt/IORT.topology
 create mode 100644 tests/data/acpi/virt/MCFG.pxb
 create mode 100644 tests/data/acpi/virt/MCFG.topology
 create mode 100644 tests/data/acpi/virt/PPTT.memhp
 create mode 100644 tests/data/acpi/virt/PPTT.numamem
 create mode 100644 tests/data/acpi/virt/PPTT.pxb
 create mode 100644 tests/data/acpi/virt/PPTT.topology
 create mode 100644 tests/data/acpi/virt/SPCR.pxb
 create mode 100644 tests/data/acpi/virt/SPCR.topology
Signature · 1 line
2.24.0
#13 lore raw

Hi Michael,

Quoted 8 lines · Michael S. Tsirkin
Quoted 7 lines · Yicong Yang

From: Yicong Yang <[email protected]>

This series mainly change the policy for building a cluster topology node in PPTT. Previously we'll always build a cluster node in PPTT without asking the user, after this set the cluster node will be built only the the user specify through "-smp clusters=X".

Quoted 4 lines
Quoted 1 line

Update the tests and test tables accordingly.

This will need an ack from virt maintainers.

Sure.

Quoted 3 lines

And I think what people are asking is about the impact of this patch on guests.

On the current kernel (tested on 6.1-rc1), there's no impact for the kernel side, only the cluster node in PPTT is not generated. Booted with -smp 8

without this patch:

with this patch:

estuary:/sys/devices/system/cpu/cpu0/topology$ cat cluster_*
ff	# cluster_cpus
0-7	# cluster_cpus_list
56	# cluster_id

with this patch:

estuary:/sys/devices/system/cpu/cpu0/topology$ cat cluster_*
ff	# cluster_cpus
0-7	# cluster_cpus_list
36	# cluster_id, with no cluster node kernel will make it to physical package id

Will send a v2 version and update this information.

Thanks.

Quoted 59 lines
Quoted 45 lines

Yicong Yang (4):
hw/acpi/aml-build: Only generate cluster node in PPTT when specified
tests: virt: update expected ACPI tables for virt test
tests: acpi: aarch64: add topology test for aarch64
tests: acpi: aarch64: add *.topology tables

 hw/acpi/aml-build.c                |   2 +-
 hw/core/machine-smp.c              |   3 +++
 include/hw/boards.h                |   2 ++
 tests/data/acpi/virt/APIC.pxb      | Bin 0 -> 168 bytes
 tests/data/acpi/virt/APIC.topology | Bin 0 -> 700 bytes
 tests/data/acpi/virt/DBG2.memhp    | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.numamem  | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.pxb      | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DBG2.topology | Bin 0 -> 87 bytes
 tests/data/acpi/virt/DSDT.topology | Bin 0 -> 5398 bytes
 tests/data/acpi/virt/FACP.pxb      | Bin 0 -> 268 bytes
 tests/data/acpi/virt/FACP.topology | Bin 0 -> 268 bytes
 tests/data/acpi/virt/GTDT.pxb      | Bin 0 -> 96 bytes
 tests/data/acpi/virt/GTDT.topology | Bin 0 -> 96 bytes
 tests/data/acpi/virt/IORT.topology | Bin 0 -> 128 bytes
 tests/data/acpi/virt/MCFG.pxb      | Bin 0 -> 60 bytes
 tests/data/acpi/virt/MCFG.topology | Bin 0 -> 60 bytes
 tests/data/acpi/virt/PPTT          | Bin 96 -> 76 bytes
 tests/data/acpi/virt/PPTT.memhp    | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.numamem  | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.pxb      | Bin 0 -> 76 bytes
 tests/data/acpi/virt/PPTT.topology | Bin 0 -> 336 bytes
 tests/data/acpi/virt/SPCR.pxb      | Bin 0 -> 80 bytes
 tests/data/acpi/virt/SPCR.topology | Bin 0 -> 80 bytes
 tests/qtest/bios-tables-test.c     |  22 ++++++++++++++++++++++
 25 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 tests/data/acpi/virt/APIC.pxb
 create mode 100644 tests/data/acpi/virt/APIC.topology
 create mode 100644 tests/data/acpi/virt/DBG2.memhp
 create mode 100644 tests/data/acpi/virt/DBG2.numamem
 create mode 100644 tests/data/acpi/virt/DBG2.pxb
 create mode 100644 tests/data/acpi/virt/DBG2.topology
 create mode 100644 tests/data/acpi/virt/DSDT.topology
 create mode 100644 tests/data/acpi/virt/FACP.pxb
 create mode 100644 tests/data/acpi/virt/FACP.topology
 create mode 100644 tests/data/acpi/virt/GTDT.pxb
 create mode 100644 tests/data/acpi/virt/GTDT.topology
 create mode 100644 tests/data/acpi/virt/IORT.topology
Quoted 11 lines
 create mode 100644 tests/data/acpi/virt/MCFG.pxb
 create mode 100644 tests/data/acpi/virt/MCFG.topology
 create mode 100644 tests/data/acpi/virt/PPTT.memhp
 create mode 100644 tests/data/acpi/virt/PPTT.numamem
 create mode 100644 tests/data/acpi/virt/PPTT.pxb
 create mode 100644 tests/data/acpi/virt/PPTT.topology
 create mode 100644 tests/data/acpi/virt/SPCR.pxb
 create mode 100644 tests/data/acpi/virt/SPCR.topology
Signature · 1 line
2.24.0

.