[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 06/13] pc: Fix error message on die-id validation
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL v2 06/13] pc: Fix error message on die-id validation |
Date: |
Tue, 3 Sep 2019 18:01:54 -0300 |
The error message for die-id range validation is incorrect. Example:
$ qemu-system-x86_64 -smp 1,sockets=6,maxcpus=6 \
-device qemu64-x86_64-cpu,socket-id=1,die-id=1,core-id=0,thread-id=0
qemu-system-x86_64: -device
qemu64-x86_64-cpu,socket-id=1,die-id=1,core-id=0,thread-id=0: \
Invalid CPU die-id: 1 must be in range 0:5
The actual range for die-id in this example is 0:0.
Fix the error message to use smp_dies and print the correct range.
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Vanderson M. do Rosario <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/i386/pc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 985e9261b0..584cd3ed0a 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -2430,7 +2430,7 @@ static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev,
return;
} else if (cpu->die_id > pcms->smp_dies - 1) {
error_setg(errp, "Invalid CPU die-id: %u must be in range 0:%u",
- cpu->die_id, max_socket);
+ cpu->die_id, pcms->smp_dies - 1);
return;
}
if (cpu->core_id < 0) {
--
2.21.0
- [Qemu-devel] [PULL v2 00/13] Machine + x86 queue, 2019-09-03, Eduardo Habkost, 2019/09/03
- [Qemu-devel] [PULL v2 01/13] includes: remove stale [smp|max]_cpus externs, Eduardo Habkost, 2019/09/03
- [Qemu-devel] [PULL v2 04/13] numa: move numa global variable have_numa_distance into MachineState, Eduardo Habkost, 2019/09/03
- [Qemu-devel] [PULL v2 03/13] numa: move numa global variable nb_numa_nodes into MachineState, Eduardo Habkost, 2019/09/03
- [Qemu-devel] [PULL v2 05/13] numa: move numa global variable numa_info into MachineState, Eduardo Habkost, 2019/09/03
- [Qemu-devel] [PULL v2 06/13] pc: Fix error message on die-id validation,
Eduardo Habkost <=
- [Qemu-devel] [PULL v2 08/13] pc: Don't make die-id mandatory unless necessary, Eduardo Habkost, 2019/09/03
- [Qemu-devel] [PULL v2 02/13] hw/arm: simplify arm_load_dtb, Eduardo Habkost, 2019/09/03
- [Qemu-devel] [PULL v2 09/13] qapi: report the default CPU type for each machine, Eduardo Habkost, 2019/09/03
- [Qemu-devel] [PULL v2 07/13] pc: Improve error message when die-id is omitted, Eduardo Habkost, 2019/09/03
- [Qemu-devel] [PULL v2 10/13] hostmem-file: fix pmem file size check, Eduardo Habkost, 2019/09/03
- [Qemu-devel] [PULL v2 11/13] i386/vmmouse: Properly reset state, Eduardo Habkost, 2019/09/03
- [Qemu-devel] [PULL v2 12/13] x86: do not advertise die-id in query-hotpluggbale-cpus if '-smp dies' is not set, Eduardo Habkost, 2019/09/03
- [Qemu-devel] [PULL v2 13/13] migration: Do not re-read the clock on pre_save in case of paused guest, Eduardo Habkost, 2019/09/03
- Re: [Qemu-devel] [PULL v2 00/13] Machine + x86 queue, 2019-09-03, Peter Maydell, 2019/09/04