fix bug that virt-manager can not support dies

(cherry picked from commit b28c8fecc4ff33ff0a4f3886688482e5c75e9008)
This commit is contained in:
lijunwei 2024-02-28 16:38:02 +08:00 committed by openeuler-sync-bot
parent 2f03b29cfb
commit c47407c470
2 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,46 @@
From 908e14f48382d839fa9c5bed98b41f34c11f3489 Mon Sep 17 00:00:00 2001
From: lijunwei <lijunwei@kylinos.cn>
Date: Wed, 28 Feb 2024 16:18:19 +0800
Subject: [PATCH] fix bug that virt-manager can not support dies
---
virtManager/domain.py | 1 +
virtinst/domain/cpu.py | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/virtManager/domain.py b/virtManager/domain.py
index ad1c76d..cfe9f15 100644
--- a/virtManager/domain.py
+++ b/virtManager/domain.py
@@ -509,6 +509,7 @@ class vmmDomain(vmmLibvirtObject):
guest.cpu.sockets = sockets
guest.cpu.cores = cores
guest.cpu.threads = threads
+ guest.cpu.dies = None
if model != _SENTINEL:
if model in guest.cpu.SPECIAL_MODES:
diff --git a/virtinst/domain/cpu.py b/virtinst/domain/cpu.py
index 3548acd..7747082 100644
--- a/virtinst/domain/cpu.py
+++ b/virtinst/domain/cpu.py
@@ -62,7 +62,7 @@ class DomainCpu(XMLBuilder):
"""
XML_NAME = "cpu"
_XML_PROP_ORDER = ["mode", "match", "_model", "vendor",
- "sockets", "cores", "threads", "features"]
+ "sockets", "cores", "threads", "dies", "features"]
special_mode_was_set = False
# These values are exposed on the command line, so are stable API
@@ -220,6 +220,7 @@ class DomainCpu(XMLBuilder):
sockets = XMLProperty("./topology/@sockets", is_int=True)
cores = XMLProperty("./topology/@cores", is_int=True)
threads = XMLProperty("./topology/@threads", is_int=True)
+ dies = XMLProperty("./topology/@dies", is_int=True)
##################
--
2.20.1

View File

@ -1,7 +1,7 @@
%global __python %{__python3}
Name: virt-manager
Version: 2.1.0
Release: 9
Release: 10
Summary: The manage virtual machines tool which via libvirt.
License: GPLv2+
BuildArch: noarch
@ -11,6 +11,7 @@ Patch0001: 0001-initrdinject-Use-full-option-versions-for-cpio.patch
Patch0002: 0002-initrdinject-Force-added-files-to-be-owned-as-root-b.patch
Patch0003: 0003-virt-manager-Add-sw64-architecture.patch
Patch0004: Add-loongarch-support.patch
Patch0005: 0001-fix-bug-that-virt-manager-can-not-support-dies.patch
Requires: virt-manager-common = %{version}-%{release} python3-gobject gtk3 libvirt-glib >= 0.0.9
Requires: gtk-vnc2 spice-gtk3 dconf vte291
Recommends: (libvirt-daemon-kvm or libvirt-daemon-qemu) libvirt-daemon-config-network
@ -83,6 +84,9 @@ done
%{_mandir}/man1/{virt-install.1*,virt-clone.1*,virt-convert.1*,virt-xml.1*}
%changelog
* Wed Feb 28 2024 lijunwei <lijunwei@kylinos.cn> - 2.1.0-10
* fix bug that virt-manager can not support features dies
* Thu Aug 10 2023 yeqinglong <yeqinglong@kylinsec.com.cn> - 2.1.0-9
- update loongarch64 support