Skip to content

Commit

Permalink
hw/core: Add missing return on error
Browse files Browse the repository at this point in the history
If dies is not supported by this machine's CPU topology, don't
keep processing options and return directly.

Fixes: 0aebebb ("machine: reject -smp dies!=1 for non-PC machines")
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
philmd authored and bonzini committed Aug 13, 2021
1 parent 24d84c7 commit 0b46318
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hw/core/machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 0b46318

Please sign in to comment.