[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] pc: Fix error message on die-id validation
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] pc: Fix error message on die-id validation |
Date: |
Fri, 16 Aug 2019 16:04:17 +0200 |
On Thu, 15 Aug 2019 15:38:01 -0300
Eduardo Habkost <address@hidden> wrote:
> 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>
Reviewed-by: Igor Mammedov <address@hidden>
PS:
there is another unrelated bug, QEMU crashes if run like this:
qemu-system-x86_64 -smp 1,sockets=6,dies=0,maxcpus=6
> ---
> 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 549c437050..24b03bb49c 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -2412,7 +2412,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) {
- [Qemu-devel] [PATCH 0/3] pc: Fix die-id validation and compatibility with libvirt, Eduardo Habkost, 2019/08/15
- [Qemu-devel] [PATCH 2/3] pc: Improve error message when die-id is omitted, Eduardo Habkost, 2019/08/15
- [Qemu-devel] [PATCH 3/3] pc: Don't make CPU properties mandatory unless necessary, Eduardo Habkost, 2019/08/15
- Re: [Qemu-devel] [PATCH 3/3] pc: Don't make CPU properties mandatory unless necessary, Markus Armbruster, 2019/08/16
- Re: [Qemu-devel] [PATCH 3/3] pc: Don't make CPU properties mandatory unless necessary, Erik Skultety, 2019/08/16
- Re: [Qemu-devel] [PATCH 3/3] pc: Don't make CPU properties mandatory unless necessary, Markus Armbruster, 2019/08/16
- Re: [Qemu-devel] [PATCH 3/3] pc: Don't make CPU properties mandatory unless necessary, Eduardo Habkost, 2019/08/16
- Re: [Qemu-devel] [PATCH 3/3] pc: Don't make CPU properties mandatory unless necessary, Yash Mankad, 2019/08/16
- Re: [Qemu-devel] [PATCH 3/3] pc: Don't make CPU properties mandatory unless necessary, Eduardo Habkost, 2019/08/20