S390 uses 5 levels of CPU topology, we implement the four lower levels:
drawers, books, sockets and cores.
Until now drawers and books were not defined, this patch add the
definition for drawers and books to the machine.
Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
---
hw/core/machine.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 6f59fb0b7f..a193ffcd3b 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -692,6 +692,16 @@ void machine_set_cpu_numa_node(MachineState *machine,
return;
}
+ if (props->has_drawer_id && !slot->props.has_drawer_id) {
+ error_setg(errp, "drawer-id is not supported");
+ return;
+ }
+
+ if (props->has_book_id && !slot->props.has_book_id) {
+ error_setg(errp, "book-id is not supported");
+ return;
+ }
+
/* skip slots with explicit mismatch */
if (props->has_thread_id && props->thread_id != slot->props.thread_id) {
continue;
@@ -705,6 +715,14 @@ void machine_set_cpu_numa_node(MachineState *machine,
continue;
}
+ if (props->has_drawer_id && props->drawer_id != slot->props.drawer_id) {
+ continue;
+ }
+
+ if (props->has_book_id && props->book_id != slot->props.book_id) {
+ continue;
+ }
+
if (props->has_socket_id && props->socket_id != slot->props.socket_id) {
continue;
}
--
2.25.1