qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] hw/i386: Expand the range of CPU topologies between smp and maxcpus
@ 2021-04-26  2:08 caodongli
  2021-04-26 13:30 ` Daniel P. Berrangé
  0 siblings, 1 reply; 4+ messages in thread
From: caodongli @ 2021-04-26  2:08 UTC (permalink / raw)
  To: mst, marcel.apfelbaum, pbonzini, richard.henderson, ehabkost
  Cc: qemu-devel, like.xu

Change the criteria for the initial CPU topology and maxcpus, user can
have more settings

Signed-off-by: Dongli Cao <caodongli@kingsoft.com>
---
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 8a84b25..ef2e819 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -751,7 +751,7 @@ void pc_smp_parse(MachineState *ms, QemuOpts *opts)
             exit(1);
         }

-        if (sockets * dies * cores * threads != ms->smp.max_cpus) {
+        if (sockets * dies * cores * threads > ms->smp.max_cpus) {
             error_report("Invalid CPU topology deprecated: "
                          "sockets (%u) * dies (%u) * cores (%u) * threads (%u) "
                          "!= maxcpus (%u)",
--
1.8.3.1









caodongli@kingsoft.com



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-27  8:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-26  2:08 [PATCH v2] hw/i386: Expand the range of CPU topologies between smp and maxcpus caodongli
2021-04-26 13:30 ` Daniel P. Berrangé
2021-04-27  2:13   ` Like Xu
2021-04-27  8:34     ` Daniel P. Berrangé

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).