qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PULL 2/3] hw/core: Add missing return on error
Date: Fri, 13 Aug 2021 15:37:15 +0200	[thread overview]
Message-ID: <20210813133716.289058-3-pbonzini@redhat.com> (raw)
In-Reply-To: <20210813133716.289058-1-pbonzini@redhat.com>

From: Philippe Mathieu-Daudé <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>
Message-Id: <20210813112608.1452541-2-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@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 943974d411..abaeda589b 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




  parent reply	other threads:[~2021-08-13 13:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 13:37 [PULL 0/3] i386, machine patches for QEMU 6.1-rc4 Paolo Bonzini
2021-08-13 13:37 ` [PULL 1/3] target/i386: Fixed size of constant for Windows Paolo Bonzini
2021-08-13 13:37 ` Paolo Bonzini [this message]
2021-08-13 13:37 ` [PULL 3/3] hw/core: fix error checking in smp_parse Paolo Bonzini
2021-08-15 10:13 ` [PULL 0/3] i386, machine patches for QEMU 6.1-rc4 Peter Maydell

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=20210813133716.289058-3-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.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).