[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC 04/52] i386/WHPX: Fix error message when fail to set ProcessorCount
From: |
Zhao Liu |
Subject: |
[RFC 04/52] i386/WHPX: Fix error message when fail to set ProcessorCount |
Date: |
Mon, 13 Feb 2023 17:49:47 +0800 |
From: Zhao Liu <zhao1.liu@intel.com>
003f230 (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>
---
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 e738d83e8191..fc349f887e47 100644
--- a/target/i386/whpx/whpx-all.c
+++ b/target/i386/whpx/whpx-all.c
@@ -2613,8 +2613,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 %d,"
+ " hr=%08lx", prop.ProcessorCount, hr);
ret = -EINVAL;
goto error;
}
--
2.34.1
- [RFC 00/52] Introduce hybrid CPU topology, Zhao Liu, 2023/02/13
- [RFC 01/52] hw/smbios: Fix smbios_smp_sockets caculation, Zhao Liu, 2023/02/13
- [RFC 02/52] hw/smbios: Fix thread count in type4, Zhao Liu, 2023/02/13
- [RFC 03/52] hw/smbios: Fix core count in type4, Zhao Liu, 2023/02/13
- [RFC 04/52] i386/WHPX: Fix error message when fail to set ProcessorCount,
Zhao Liu <=
- [RFC 05/52] hw/core/machine: Rename machine-smp.c to machine-topo.c, Zhao Liu, 2023/02/13
- [RFC 06/52] hw/cpu: Introduce hybrid CPU topology, Zhao Liu, 2023/02/13