qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 3/3] hw/riscv: Validate cluster and NUMA node boundary


From: Daniel Henrique Barboza
Subject: Re: [PATCH v3 3/3] hw/riscv: Validate cluster and NUMA node boundary
Date: Mon, 27 Feb 2023 09:38:34 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0



On 2/25/23 03:35, Gavin Shan wrote:
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>

  hw/riscv/spike.c | 2 ++
  hw/riscv/virt.c  | 2 ++
  2 files changed, 4 insertions(+)

diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
index cc3f6dac17..b09b993634 100644
--- a/hw/riscv/spike.c
+++ b/hw/riscv/spike.c
@@ -357,6 +357,8 @@ static void spike_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.spike.ram";
  }
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index b81081c70b..e5bb168169 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -1636,6 +1636,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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]