]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/arm: Validate cluster and NUMA node boundary
authorGavin Shan <gshan@redhat.com>
Tue, 9 May 2023 00:27:38 +0000 (10:27 +1000)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 26 Jun 2023 08:23:01 +0000 (10:23 +0200)
There are two ARM machines where NUMA is aware: 'virt' and 'sbsa-ref'.
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 have been associated with different NUMA
nodes.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20230509002739.18388-3-gshan@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/arm/sbsa-ref.c
hw/arm/virt.c

index 0639f97dd5f30f38ef124fe41ad7289d51ae2bc3..b774d802918d6a4db5381b09bccbe61e8e3cba75 100644 (file)
@@ -910,6 +910,8 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
     mc->possible_cpu_arch_ids = sbsa_ref_possible_cpu_arch_ids;
     mc->cpu_index_to_instance_props = sbsa_ref_cpu_index_to_props;
     mc->get_default_cpu_node_id = sbsa_ref_get_default_cpu_node_id;
+    /* platform instead of architectural choice */
+    mc->cpu_cluster_has_numa_boundary = true;
 }
 
 static const TypeInfo sbsa_ref_info = {
index 9b9f7d9c687c8fc420b21ea1150c83b1a4db1dfe..3937e304774ecda57138a4b1c9c4d2c20c8790ba 100644 (file)
@@ -3033,6 +3033,8 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
     mc->smp_props.clusters_supported = true;
     mc->auto_enable_numa_with_memhp = true;
     mc->auto_enable_numa_with_memdev = true;
+    /* platform instead of architectural choice */
+    mc->cpu_cluster_has_numa_boundary = true;
     mc->default_ram_id = "mach-virt.ram";
     mc->default_nic = "virtio-net-pci";