machine: Put all sanity-check in the generic SMP parser
commit8bdfec393a2ac67df9cecc0983d130db4a6bba58
authorYanan Wang <wangyanan55@huawei.com>
Wed, 29 Sep 2021 02:58:15 +0000 (29 10:58 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 1 Oct 2021 17:04:31 +0000 (1 19:04 +0200)
tree037eda9c70b3439890b2386bf4e743415321e009
parente7f944bb94a375e8ee7469ffa535ea6e11ce59e1
machine: Put all sanity-check in the generic SMP parser

Put both sanity-check of the input SMP configuration and sanity-check
of the output SMP configuration uniformly in the generic parser. Then
machine_set_smp() will become cleaner, also all the invalid scenarios
can be tested only by calling the parser.

Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20210929025816.21076-16-wangyanan55@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/core/machine.c