diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2021-10-29 13:27:35 +0100 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2022-01-20 14:16:38 -0500 |
commit | 9a578e1ac58eccd7b7a8123ce7fe22cbf8080b3a (patch) | |
tree | 2af67b4f267cc70158b53297b7ca9f632784496c /tests/test_misc.py | |
parent | e1c8866163a2861f79a08ce4e1487fc84b7d1ec1 (diff) | |
download | virt-manager-9a578e1ac58eccd7b7a8123ce7fe22cbf8080b3a.tar.gz |
virtinst: prefer cores when exposing topology to the guest
In real world silicon though it is rare to have high socket/die counts,
but common to have huge core counts.
Some OS will even refuse to use sockets over a certain count.
Thus we prefer to expose cores to the guest rather than sockets as the
default for missing fields.
This matches a recent change made in QEMU for new machine types
commit 4a0af2930a4e4f64ce551152fdb4b9e7be106408
Author: Yanan Wang <wangyanan55@huawei.com>
Date: Wed Sep 29 10:58:09 2021 +0800
machine: Prefer cores over sockets in smp parsing since 6.2
Closes: https://github.com/virt-manager/virt-manager/issues/155
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'tests/test_misc.py')
-rw-r--r-- | tests/test_misc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_misc.py b/tests/test_misc.py index 9b8c95ef..25e12f94 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -38,7 +38,7 @@ def test_misc_cpu_topology(): cpu = virtinst.DomainCpu(conn) cpu.topology.dies = "3" cpu.set_topology_defaults(9) - assert get_top(cpu) == [3, 3, 1, 1] + assert get_top(cpu) == [1, 3, 3, 1] cpu = virtinst.DomainCpu(conn) cpu.topology.cores = "4" @@ -48,7 +48,7 @@ def test_misc_cpu_topology(): cpu = virtinst.DomainCpu(conn) cpu.topology.threads = "3" cpu.set_topology_defaults(12) - assert get_top(cpu) == [4, 1, 1, 3] + assert get_top(cpu) == [1, 1, 4, 3] cpu = virtinst.DomainCpu(conn) cpu.topology.threads = "3" |