Cc'ing qemu-triv...@nongnu.org. What about this simple one ?

Before this patch, with "-smp 4, dies=2" for a PC machine, we will generate warn strings like: qemu-system-x86_64: warning: CPU(s) not present in any NUMA nodes: CPU 0 [socket-id: 0die-id: 0, core-id: 0, thread-id: 0]

After we will get,
qemu-system-x86_64: warning: CPU(s) not present in any NUMA nodes: CPU 0 [socket-id: 0, die-id: 0, core-id: 0, thread-id: 0]

Thanks,
Yanan

On 2021/10/8 15:50, Yanan Wang wrote:
The expected output string from cpu_slot_to_string() ought to be
like "socket-id: *, die-id: *, core-id: *, thread-id: *", so add
the missing ", " before "die-id". This affects the readability
of the error message.

Fixes: 176d2cda0d ("i386/cpu: Consolidate die-id validity in smp context")
Signed-off-by: Yanan Wang <wangyana...@huawei.com>
---
  hw/core/machine.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/hw/core/machine.c b/hw/core/machine.c
index b8d95eec32..0a23ae3106 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -1157,6 +1157,9 @@ static char *cpu_slot_to_string(const CPUArchId *cpu)
          g_string_append_printf(s, "socket-id: %"PRId64, cpu->props.socket_id);
      }
      if (cpu->props.has_die_id) {
+        if (s->len) {
+            g_string_append_printf(s, ", ");
+        }
          g_string_append_printf(s, "die-id: %"PRId64, cpu->props.die_id);
      }
      if (cpu->props.has_core_id) {


Reply via email to