On Thu, Jun 10, 2021 at 03:35:36PM +0200, Paolo Bonzini wrote: > 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. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > hw/core/machine.c | 33 +++++++++++++++++++++++---------- > hw/i386/pc.c | 18 ++++++++---------- > include/hw/boards.h | 2 +- > qapi/machine.json | 27 +++++++++++++++++++++++++++ > 4 files changed, 59 insertions(+), 21 deletions(-)
> +## > +# @SMPConfiguration: > +# > +# Schema for CPU topology configuration. > +# > +# @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 Perhaps document that a value of "0" means "automatically figure out a suitable count" based on other specified values. >From a functional POV though it is fine so Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|