All of lore.kernel.org
 help / color / mirror / Atom feed
From: "caodongli@tsinghua.edu.cn" <caodongli@tsinghua.edu.cn>
To: mst <mst@redhat.com>,
	marcel.apfelbaum <marcel.apfelbaum@gmail.com>,
	 pbonzini <pbonzini@redhat.com>,
	 richard.henderson <richard.henderson@linaro.org>,
	 ehabkost <ehabkost@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, "like.xu" <like.xu@linux.intel.com>
Subject: [PATCH] hw/i386: Expand the range of CPU topologies between smp and maxcpus
Date: Sun, 25 Apr 2021 19:22:09 +0800	[thread overview]
Message-ID: <2021042519220937479214@tsinghua.edu.cn> (raw)

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@tsinghua.edu.cn



                 reply	other threads:[~2021-04-25 14:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=2021042519220937479214@tsinghua.edu.cn \
    --to=caodongli@tsinghua.edu.cn \
    --cc=ehabkost@redhat.com \
    --cc=like.xu@linux.intel.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.