machine: pass QAPI struct to mc->smp_parse

As part of converting -smp to a property with a QAPI type, define
the struct and use it to do the actual parsing.  machine_smp_parse
takes care of doing the QemuOpts->QAPI conversion by hand, for now.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210617155308.928754-10-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini
2021-06-25 16:16:11 +02:00
parent abc2f51144
commit 1e63fe6858
4 changed files with 60 additions and 21 deletions
+28
View File
@@ -1284,3 +1284,31 @@
##
{ 'event': 'MEM_UNPLUG_ERROR',
'data': { 'device': 'str', 'msg': 'str' } }
##
# @SMPConfiguration:
#
# Schema for CPU topology configuration. "0" or a missing value lets
# QEMU figure out a suitable value based on the ones that are provided.
#
# @cpus: number of virtual CPUs in the virtual machine
#
# @sockets: number of sockets in the CPU topology
#
# @dies: number of dies per socket in the CPU topology
#
# @cores: number of cores per thread in the CPU topology
#
# @threads: number of threads per core in the CPU topology
#
# @maxcpus: maximum number of hotpluggable virtual CPUs in the virtual machine
#
# Since: 6.1
##
{ 'struct': 'SMPConfiguration', 'data': {
'*cpus': 'int',
'*sockets': 'int',
'*dies': 'int',
'*cores': 'int',
'*threads': 'int',
'*maxcpus': 'int' } }