From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P . Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH-for-6.1? v2 1/3] hw/core: Add missing return on error
Date: Fri, 13 Aug 2021 13:26:06 +0200 [thread overview]
Message-ID: <20210813112608.1452541-2-philmd@redhat.com> (raw)
In-Reply-To: <20210813112608.1452541-1-philmd@redhat.com>
If dies is not supported by this machine's CPU topology, don't
keep processing options and return directly.
Fixes: 0aebebb561c ("machine: reject -smp dies!=1 for non-PC machines")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/core/machine.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 943974d411c..abaeda589b7 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -752,6 +752,7 @@ static void smp_parse(MachineState *ms, SMPConfiguration *config, Error **errp)
if (config->has_dies && config->dies != 0 && config->dies != 1) {
error_setg(errp, "dies not supported by this machine's CPU topology");
+ return;
}
/* compute missing values, prefer sockets over cores over threads */
--
2.31.1
next prev parent reply other threads:[~2021-08-13 11:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 11:26 [PATCH-for-6.1? v2 0/3] hw/core: fix error checkig in smp_parse Philippe Mathieu-Daudé
2021-08-13 11:26 ` Philippe Mathieu-Daudé [this message]
2021-08-13 12:29 ` [PATCH-for-6.1? v2 1/3] hw/core: Add missing return on error Paolo Bonzini
2021-08-13 11:26 ` [PATCH-for-6.1? v2 2/3] hw/core: Have MachineClass::smp_parse() return boolean " Philippe Mathieu-Daudé
2021-08-13 12:26 ` Paolo Bonzini
2021-08-13 11:26 ` [PATCH-for-6.1? v2 3/3] hw/core: fix error checkig in smp_parse Philippe Mathieu-Daudé
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=20210813112608.1452541-2-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=berrange@redhat.com \
--cc=ehabkost@redhat.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 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).