aboutsummaryrefslogtreecommitdiff
path: root/hw/riscv/virt.c
diff options
context:
space:
mode:
authorGavin Shan <gshan@redhat.com>2023-05-09 10:27:39 +1000
committerPaolo Bonzini <pbonzini@redhat.com>2023-06-26 10:23:01 +0200
commit3d9981cde964ea80f9c58072ddbb4df8b5a7183a (patch)
treedb3892903663083fcdc6ebf002714f2163316b75 /hw/riscv/virt.c
parentfecff672351ace5e39adf7dbcf7a8ee748b201cb (diff)
downloadqemu-3d9981cde964ea80f9c58072ddbb4df8b5a7183a.zip
qemu-3d9981cde964ea80f9c58072ddbb4df8b5a7183a.tar.gz
qemu-3d9981cde964ea80f9c58072ddbb4df8b5a7183a.tar.bz2
hw/riscv: Validate cluster and NUMA node boundary
There are two RISCV machines where NUMA is aware: 'virt' and 'spike'. Both of them are required to follow cluster-NUMA-node boundary. To enable the validation to warn about the irregular configuration where multiple CPUs in one cluster has been associated with multiple NUMA nodes. Signed-off-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Acked-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230509002739.18388-4-gshan@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/riscv/virt.c')
-rw-r--r--hw/riscv/virt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 95708d8..ed4c274 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -1669,6 +1669,8 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
mc->cpu_index_to_instance_props = riscv_numa_cpu_index_to_props;
mc->get_default_cpu_node_id = riscv_numa_get_default_cpu_node_id;
mc->numa_mem_supported = true;
+ /* platform instead of architectural choice */
+ mc->cpu_cluster_has_numa_boundary = true;
mc->default_ram_id = "riscv_virt_board.ram";
assert(!mc->get_hotplug_handler);
mc->get_hotplug_handler = virt_machine_get_hotplug_handler;