virtinst: add missing 'dies' parameter for --vcpus

Although using --cpu topology.XXX is the preferred way to set topology,
it is still possible via the --vcpus parameter. For consistency, this
should support the full set of parameters, so dies needs to be added.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2021-10-29 15:41:10 +01:00 committed by Cole Robinson
parent ca8950f0ed
commit 95eb8dda9b
4 changed files with 4 additions and 3 deletions

View File

@ -289,7 +289,7 @@ Number of virtual cpus to configure for the guest. If 'maxvcpus' is specified,
the guest will be able to hotplug up to MAX vcpus while the guest is running,
but will startup with VCPUS.
CPU topology can additionally be specified with sockets, cores, and threads.
CPU topology can additionally be specified with sockets, dies, cores, and threads.
If values are omitted, the rest will be autofilled preferring sockets over
cores over threads.

View File

@ -37,7 +37,7 @@
<cpu mode="custom" match="exact">
<model fallback="forbid">Broadwell</model>
<vendor>Intel</vendor>
<topology sockets="2" cores="2" threads="2"/>
<topology sockets="2" dies="1" cores="2" threads="2"/>
<feature policy="require" name="vme"/>
<feature policy="require" name="ss"/>
<feature policy="require" name="f16c"/>

View File

@ -467,7 +467,7 @@ c = vinst.add_category("xml-comparsion", "--connect %(URI-KVM)s --noautoconsole
c.add_compare("""
--memory 1024
--uuid 12345678-12F4-1234-1234-123456789AFA
--vcpus 4,cores=2,threads=2,sockets=2 --cpuset=1,3-5
--vcpus 4,cores=2,threads=2,dies=1,sockets=2 --cpuset=1,3-5
--cpu host-copy
--description \"foobar & baz\"
--boot uefi,smbios_mode=emulate,boot1.dev=hd,boot.dev=network,initarg1=bar=baz,initarg=foo

View File

@ -2657,6 +2657,7 @@ class ParserVCPU(VirtCLIParser):
# Further CPU options should be added to --cpu
cls.add_arg("sockets", "cpu.topology.sockets")
cls.add_arg("dies", "cpu.topology.dies")
cls.add_arg("cores", "cpu.topology.cores")
cls.add_arg("threads", "cpu.topology.threads")