diff options
author | Yanan Wang <wangyanan55@huawei.com> | 2021-09-29 10:58:03 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-01 15:27:56 +0200 |
commit | 5d8b5a505571b7927095015c805646f78fc56578 (patch) | |
tree | 2b2ff9cb3780cb5b99e54e1ba7a297c823d8bf71 /scripts/qapi | |
parent | c2511b1632e109130df524121dfb7d2413216d3c (diff) | |
download | qemu-5d8b5a505571b7927095015c805646f78fc56578.zip qemu-5d8b5a505571b7927095015c805646f78fc56578.tar.gz qemu-5d8b5a505571b7927095015c805646f78fc56578.tar.bz2 |
machine: Minor refactor/fix for the smp parsers
To pave the way for the functional improvement in later patches,
make some refactor/cleanup for the smp parsers, including using
local maxcpus instead of ms->smp.max_cpus in the calculation,
defaulting dies to 0 initially like other members, cleanup the
sanity check for dies.
We actually also fix a hidden defect by avoiding directly using
the provided *zero value* in the calculation, which could cause
a segment fault (e.g. using dies=0 in the calculation).
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20210929025816.21076-4-wangyanan55@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/qapi')
0 files changed, 0 insertions, 0 deletions