[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v6 08/12] pc: Improve error message when die-id is om
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL v6 08/12] pc: Improve error message when die-id is omitted |
Date: |
Wed, 28 Aug 2019 15:40:22 -0300 |
The error message when die-id is omitted doesn't make sense:
$ qemu-system-x86_64 -smp 1,sockets=6,maxcpus=6 \
-device qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0
qemu-system-x86_64: -device
qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0: \
Invalid CPU die-id: 4294967295 must be in range 0:0
Fix it, so it will now read:
qemu-system-x86_64: -device
qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0: \
CPU die-id is not set
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 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 584cd3ed0a..3494423d63 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -2428,6 +2428,10 @@ static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev,
error_setg(errp, "Invalid CPU socket-id: %u must be in range 0:%u",
cpu->socket_id, max_socket);
return;
+ }
+ if (cpu->die_id < 0) {
+ error_setg(errp, "CPU die-id is not set");
+ 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, pcms->smp_dies - 1);
--
2.21.0
- [Qemu-devel] [PULL v6 00/12] Machine + x86 queue, 2019-08-28, Eduardo Habkost, 2019/08/28
- [Qemu-devel] [PULL v6 01/12] includes: remove stale [smp|max]_cpus externs, Eduardo Habkost, 2019/08/28
- [Qemu-devel] [PULL v6 02/12] hw/arm: simplify arm_load_dtb, Eduardo Habkost, 2019/08/28
- [Qemu-devel] [PULL v6 03/12] numa: move numa global variable nb_numa_nodes into MachineState, Eduardo Habkost, 2019/08/28
- [Qemu-devel] [PULL v6 04/12] numa: move numa global variable have_numa_distance into MachineState, Eduardo Habkost, 2019/08/28
- [Qemu-devel] [PULL v6 05/12] numa: move numa global variable numa_info into MachineState, Eduardo Habkost, 2019/08/28
- [Qemu-devel] [PULL v6 06/12] numa: Introduce MachineClass::auto_enable_numa for implicit NUMA node, Eduardo Habkost, 2019/08/28
- [Qemu-devel] [PULL v6 07/12] pc: Fix error message on die-id validation, Eduardo Habkost, 2019/08/28
- [Qemu-devel] [PULL v6 08/12] pc: Improve error message when die-id is omitted,
Eduardo Habkost <=
- [Qemu-devel] [PULL v6 09/12] pc: Don't make die-id mandatory unless necessary, Eduardo Habkost, 2019/08/28
- [Qemu-devel] [PULL v6 10/12] qapi: report the default CPU type for each machine, Eduardo Habkost, 2019/08/28
- [Qemu-devel] [PULL v6 11/12] hostmem-file: fix pmem file size check, Eduardo Habkost, 2019/08/28
- [Qemu-devel] [PULL v6 12/12] i386/vmmouse: Properly reset state, Eduardo Habkost, 2019/08/28