[virt-manager] [PATCH 5/7] domain: cpu: Add function has_private_memAccess_cells()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It returns true in case any of numa nodes has the "private" memAccess
attribute.

Signed-off-by: Lin Ma <lma@xxxxxxxx>
---
 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





[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux