[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 27/30] target/i386/WHPX: Fix error message when fail to set Proces
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 27/30] target/i386/WHPX: Fix error message when fail to set ProcessorCount |
Date: |
Wed, 28 Jun 2023 17:53:10 +0200 |
From: Zhao Liu <zhao1.liu@intel.com>
003f230e37d7 ("machine: Tweak the order of topology members in struct
CpuTopology") changes the meaning of MachineState.smp.cores from "the
number of cores in one package" to "the number of cores in one die"
and doesn't fix other uses of MachineState.smp.cores. And because of
the introduction of cluster, now smp.cores just means "the number of
cores in one cluster". This clearly does not fit the semantics here.
And before this error message, WHvSetPartitionProperty() is called to
set prop.ProcessorCount.
So the error message should show the prop.ProcessorCount other than
"cores per cluster" or "cores per package".
Cc: Sunil Muthuswamy <sunilmut@microsoft.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230529124331.412822-1-zhao1.liu@linux.intel.com>
[PMD: Use '%u' format for ProcessorCount]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/i386/whpx/whpx-all.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c
index 9ee04ee650..57580ca383 100644
--- a/target/i386/whpx/whpx-all.c
+++ b/target/i386/whpx/whpx-all.c
@@ -2598,8 +2598,8 @@ static int whpx_accel_init(MachineState *ms)
sizeof(WHV_PARTITION_PROPERTY));
if (FAILED(hr)) {
- error_report("WHPX: Failed to set partition core count to %d,"
- " hr=%08lx", ms->smp.cores, hr);
+ error_report("WHPX: Failed to set partition processor count to %u,"
+ " hr=%08lx", prop.ProcessorCount, hr);
ret = -EINVAL;
goto error;
}
--
2.38.1
- [PULL 21/30] hw/intc/arm_gic: Un-inline GIC*/ITS class_name() helpers, (continued)
- [PULL 21/30] hw/intc/arm_gic: Un-inline GIC*/ITS class_name() helpers, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 28/30] exec/memory: Add symbolic value for memory listener priority for accel, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 20/30] accel/kvm: Declare kvm_direct_msi_allowed in stubs, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 24/30] target/arm: Restrict KVM-specific fields from ArchCPU, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 25/30] target/ppc: Restrict KVM-specific fields from ArchCPU, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 23/30] hw/arm/sbsa-ref: Include missing 'sysemu/kvm.h' header, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 26/30] target/riscv: Restrict KVM-specific fields from ArchCPU, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 29/30] exec/memory: Add symbol for memory listener priority for device backend, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 22/30] hw/intc/arm_gic: Rename 'first_cpu' argument, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 30/30] exec/memory: Add symbol for the min value of memory listener priority, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 27/30] target/i386/WHPX: Fix error message when fail to set ProcessorCount,
Philippe Mathieu-Daudé <=
- Re: [PULL 00/30] Accelerator patches for 2023-06-28, Richard Henderson, 2023/06/29