[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/38] hw/acpi/aml-build: Support cluster level in PPTT generation
From: |
Peter Maydell |
Subject: |
[PULL 09/38] hw/acpi/aml-build: Support cluster level in PPTT generation |
Date: |
Thu, 20 Jan 2022 12:36:01 +0000 |
From: Yanan Wang <wangyanan55@huawei.com>
Support CPU cluster topology level in generation of ACPI
Processor Properties Topology Table (PPTT).
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Message-id: 20220107083232.16256-6-wangyanan55@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/acpi/aml-build.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 6aaedca2e56..bb2cad63b53 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -2001,6 +2001,7 @@ static void build_processor_hierarchy_node(GArray *tbl,
uint32_t flags,
void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
const char *oem_id, const char *oem_table_id)
{
+ MachineClass *mc = MACHINE_GET_CLASS(ms);
GQueue *list = g_queue_new();
guint pptt_start = table_data->len;
guint parent_offset;
@@ -2025,6 +2026,23 @@ void build_pptt(GArray *table_data, BIOSLinker *linker,
MachineState *ms,
0, socket, NULL, 0);
}
+ if (mc->smp_props.clusters_supported) {
+ length = g_queue_get_length(list);
+ for (i = 0; i < length; i++) {
+ int cluster;
+
+ parent_offset = GPOINTER_TO_UINT(g_queue_pop_head(list));
+ for (cluster = 0; cluster < ms->smp.clusters; cluster++) {
+ g_queue_push_tail(list,
+ GUINT_TO_POINTER(table_data->len - pptt_start));
+ build_processor_hierarchy_node(
+ table_data,
+ (0 << 0), /* not a physical package */
+ parent_offset, cluster, NULL, 0);
+ }
+ }
+ }
+
length = g_queue_get_length(list);
for (i = 0; i < length; i++) {
int core;
--
2.25.1
- [PULL 00/38] target-arm queue, Peter Maydell, 2022/01/20
- [PULL 05/38] hw/arm/virt: Support CPU cluster on ARM virt machine, Peter Maydell, 2022/01/20
- [PULL 01/38] hw/arm/virt: KVM: Enable PAuth when supported by the host, Peter Maydell, 2022/01/20
- [PULL 09/38] hw/acpi/aml-build: Support cluster level in PPTT generation,
Peter Maydell <=
- [PULL 17/38] hw/arm/virt: Add a control for the the highmem redistributors, Peter Maydell, 2022/01/20
- [PULL 08/38] tests/acpi/bios-tables-test: Allow changes to virt/PPTT file, Peter Maydell, 2022/01/20
- [PULL 02/38] hw: Move MARVELL_88W8618 Kconfig from audio/ to arm/, Peter Maydell, 2022/01/20
- [PULL 12/38] virtio-mem: Correct default THP size for ARM64, Peter Maydell, 2022/01/20
- [PULL 14/38] hw/intc/arm_gic: Implement read of GICC_IIDR, Peter Maydell, 2022/01/20
- [PULL 23/38] hw/misc/aspeed_i3c.c: Introduce a dummy AST2600 I3C model., Peter Maydell, 2022/01/20
- [PULL 35/38] hw/intc/arm_gicv3_its: Factor out "find address of table entry" code, Peter Maydell, 2022/01/20
- [PULL 18/38] hw/arm/virt: Honor highmem setting when computing the memory map, Peter Maydell, 2022/01/20
- [PULL 34/38] hw/intc/arm_gicv3_its: Fix return codes in process_mapd(), Peter Maydell, 2022/01/20
- [PULL 31/38] hw/intc/arm_gicv3_its: Refactor process_its_cmd() to reduce nesting, Peter Maydell, 2022/01/20