[virt-tools-list] [virt-manager 4/8] domain: cpu: Add function has_private_memAccess_cells()
Lin Ma
lma at suse.com
Wed Jun 30 12:11:02 UTC 2021
It returns true in case any of numa nodes has the "private" memAccess
attribute.
Signed-off-by: Lin Ma <lma at suse.com>
---
virtinst/domain/cpu.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/virtinst/domain/cpu.py b/virtinst/domain/cpu.py
index 55def91f..01e6c9aa 100644
--- a/virtinst/domain/cpu.py
+++ b/virtinst/domain/cpu.py
@@ -203,6 +203,12 @@ class DomainCpu(XMLBuilder):
cells = XMLChildProperty(_CPUCell, relative_xpath="./numa")
cache = XMLChildProperty(_CPUCache, is_single=True)
+ def has_private_memAccess_cells(self):
+ for cell in self.cells:
+ if cell.memAccess == "private":
+ return True
+ return False
+
def copy_host_cpu(self, guest):
"""
Try to manually mimic host-model, copying all the info
--
2.26.2
More information about the virt-tools-list
mailing list