From: Zhao Liu <zhao1.liu@linux.intel.com>
To: Sunil Muthuswamy <sunilmut@microsoft.com>
Cc: qemu-devel@nongnu.org, Zhenyu Wang <zhenyu.z.wang@intel.com>,
Zhao Liu <zhao1.liu@intel.com>
Subject: [PATCH] i386/WHPX: Fix error message when fail to set ProcessorCount
Date: Mon, 29 May 2023 20:43:31 +0800 [thread overview]
Message-ID: <20230529124331.412822-1-zhao1.liu@linux.intel.com> (raw)
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>
---
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 52af81683c1e..5882bf22d0a1 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
next reply other threads:[~2023-05-29 12:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 12:43 Zhao Liu [this message]
2023-06-13 7:49 ` [PATCH] i386/WHPX: Fix error message when fail to set ProcessorCount Zhao Liu
2023-06-28 1:31 ` Zhao Liu
2023-06-28 6:19 ` Philippe Mathieu-Daudé
2023-06-28 11:59 ` Philippe Mathieu-Daudé
2023-06-28 13:04 ` Zhao Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230529124331.412822-1-zhao1.liu@linux.intel.com \
--to=zhao1.liu@linux.intel.com \
--cc=qemu-devel@nongnu.org \
--cc=sunilmut@microsoft.com \
--cc=zhao1.liu@intel.com \
--cc=zhenyu.z.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).