OSDN Git Service

target/i386/WHPX: Fix error message when fail to set ProcessorCount
authorZhao Liu <zhao1.liu@intel.com>
Mon, 29 May 2023 12:43:31 +0000 (20:43 +0800)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 28 Jun 2023 12:27:59 +0000 (14:27 +0200)
commitdb5a06b3a21239ffa9424f89f98ee9afa14e955b
treedd43c385a90ebe38fabbb7a1712f8fa3257eed37
parent9638cbde6c4f433b157672c0fdee783c10be45fe
target/i386/WHPX: Fix error message when fail to set ProcessorCount

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