[virt-manager] [PATCH 6/7] domain: cpu: Add function all_shared_memAccess_cells()

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


It returns true in case all of numa nodes have the "shared" memAccess
attribute defined explicitly.

Signed-off-by: Lin Ma <lma@xxxxxxxx>
 virtinst/domain/cpu.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/virtinst/domain/cpu.py b/virtinst/domain/cpu.py
index 01e6c9aa..76e69bb5 100644
--- a/virtinst/domain/cpu.py
+++ b/virtinst/domain/cpu.py
@@ -209,6 +209,14 @@ class DomainCpu(XMLBuilder):
                 return True
         return False
+    def all_shared_memAccess_cells(self):
+        if not self.cells:
+            return False
+        for cell in self.cells:
+            if cell.memAccess != "shared":
+                return False
+        return True
     def copy_host_cpu(self, guest):
         Try to manually mimic host-model, copying all the info

[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