[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/22] hw/core: Support module-id in numa configuration
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 22/22] hw/core: Support module-id in numa configuration |
Date: |
Thu, 25 Apr 2024 13:01:55 +0200 |
From: Zhao Liu <zhao1.liu@intel.com>
Module is a level above the core, thereby supporting numa
configuration on the module level can bring user more numa flexibility.
This is the natural further support for module level.
Add module level support in numa configuration.
Tested-by: Yongwei Ma <yongwei.ma@intel.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Message-ID: <20240424154929.1487382-5-zhao1.liu@intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/core/machine.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 494b712a76..0dec48e802 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -800,6 +800,11 @@ void machine_set_cpu_numa_node(MachineState *machine,
return;
}
+ if (props->has_module_id && !slot->props.has_module_id) {
+ error_setg(errp, "module-id is not supported");
+ return;
+ }
+
if (props->has_cluster_id && !slot->props.has_cluster_id) {
error_setg(errp, "cluster-id is not supported");
return;
@@ -824,6 +829,11 @@ void machine_set_cpu_numa_node(MachineState *machine,
continue;
}
+ if (props->has_module_id &&
+ props->module_id != slot->props.module_id) {
+ continue;
+ }
+
if (props->has_cluster_id &&
props->cluster_id != slot->props.cluster_id) {
continue;
@@ -1226,6 +1236,12 @@ static char *cpu_slot_to_string(const CPUArchId *cpu)
}
g_string_append_printf(s, "cluster-id: %"PRId64,
cpu->props.cluster_id);
}
+ if (cpu->props.has_module_id) {
+ if (s->len) {
+ g_string_append_printf(s, ", ");
+ }
+ g_string_append_printf(s, "module-id: %"PRId64, cpu->props.module_id);
+ }
if (cpu->props.has_core_id) {
if (s->len) {
g_string_append_printf(s, ", ");
--
2.41.0
- [PULL 18/22] hw/i386/pc_sysfw: Remove unused parameter from pc_isa_bios_init(), (continued)
- [PULL 18/22] hw/i386/pc_sysfw: Remove unused parameter from pc_isa_bios_init(), Philippe Mathieu-Daudé, 2024/04/25
- [PULL 09/22] hw/riscv/virt: Replace sprintf by g_strdup_printf, Philippe Mathieu-Daudé, 2024/04/25
- [PULL 12/22] hw/cxl/cxl-cdat: Make ct3_load_cdat() return boolean, Philippe Mathieu-Daudé, 2024/04/25
- [PULL 13/22] hw/cxl/cxl-cdat: Make ct3_build_cdat() return boolean, Philippe Mathieu-Daudé, 2024/04/25
- [PULL 16/22] hw/xtensa: Include missing 'exec/cpu-common.h' in 'bootparam.h', Philippe Mathieu-Daudé, 2024/04/25
- [PULL 15/22] hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc, Philippe Mathieu-Daudé, 2024/04/25
- [PULL 10/22] hw: Fix problem with the A*MPCORE switches in the Kconfig files, Philippe Mathieu-Daudé, 2024/04/25
- [PULL 20/22] hw/core/machine: Support modules in -smp, Philippe Mathieu-Daudé, 2024/04/25
- [PULL 11/22] hw: Add a Kconfig switch for the TYPE_CPU_CLUSTER device, Philippe Mathieu-Daudé, 2024/04/25
- [PULL 21/22] hw/core: Introduce module-id as the topology subindex, Philippe Mathieu-Daudé, 2024/04/25
- [PULL 22/22] hw/core: Support module-id in numa configuration,
Philippe Mathieu-Daudé <=
- [PULL 17/22] hw/misc : Correct 5 spaces indents in stm32l4x5_exti, Philippe Mathieu-Daudé, 2024/04/25
- Re: [PULL 00/22] Misc HW patches for 2024-04-25, Richard Henderson, 2024/04/25