hw/core: Add missing return on error
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 13 Aug 2021 11:26:06 +0000 (13:26 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 13 Aug 2021 12:43:35 +0000 (14:43 +0200)
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

index 943974d411c04ba966496242981a8d476a3cdd31..abaeda589b777f018a78e2ca69eb2d707f9160c3 100644 (file)
@@ -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 */