mirror of
https://src.fedoraproject.org/rpms/virt-manager.git
synced 2025-07-16 09:04:55 +00:00
42 lines
1.6 KiB
Diff
42 lines
1.6 KiB
Diff
From: Cole Robinson <crobinso@redhat.com>
|
|
Date: Thu, 3 Apr 2014 10:30:37 -0400
|
|
Subject: [PATCH virt-manager] details: Fix showing vcpus values in 'customize'
|
|
dialog (bz 1083903)
|
|
|
|
(cherry picked from commit ee6a541167b787a84cc5c7e553089cbd5ab9ada3)
|
|
---
|
|
virtManager/details.py | 9 ++++++---
|
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/virtManager/details.py b/virtManager/details.py
|
|
index c1833ae..ea9d91a 100644
|
|
--- a/virtManager/details.py
|
|
+++ b/virtManager/details.py
|
|
@@ -2533,6 +2533,12 @@ class vmmDetails(vmmGObjectUI):
|
|
self.vm.network_traffic_vector())
|
|
|
|
def refresh_config_cpu(self):
|
|
+ # This bit needs to come first, since CPU values can be affected
|
|
+ # by whether topology is enabled
|
|
+ cpu = self.vm.get_cpu_config()
|
|
+ show_top = bool(cpu.sockets or cpu.cores or cpu.threads)
|
|
+ self.widget("cpu-topology-enable").set_active(show_top)
|
|
+
|
|
conn = self.vm.conn
|
|
host_active_count = conn.host_active_processor_count()
|
|
maxvcpus = self.vm.vcpu_max_count()
|
|
@@ -2550,13 +2556,10 @@ class vmmDetails(vmmGObjectUI):
|
|
self.widget("config-vcpus-warn-box").set_visible(warn)
|
|
|
|
# CPU model config
|
|
- cpu = self.vm.get_cpu_config()
|
|
- show_top = bool(cpu.sockets or cpu.cores or cpu.threads)
|
|
sockets = cpu.sockets or 1
|
|
cores = cpu.cores or 1
|
|
threads = cpu.threads or 1
|
|
|
|
- self.widget("cpu-topology-enable").set_active(show_top)
|
|
self.widget("cpu-sockets").set_value(sockets)
|
|
self.widget("cpu-cores").set_value(cores)
|
|
self.widget("cpu-threads").set_value(threads)
|