domain: cpu: Add function has_private_memAccess_cells()

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

Signed-off-by: Lin Ma <lma@suse.com>
This commit is contained in:
Lin Ma 2021-08-01 20:36:40 +08:00 committed by Cole Robinson
parent 0864a9b231
commit f223992934

View File

@ -412,6 +412,12 @@ class DomainCpu(XMLBuilder):
return return
self.topology.set_defaults_from_vcpus(vcpus) self.topology.set_defaults_from_vcpus(vcpus)
def has_private_memAccess_cells(self):
for cell in self.cells:
if cell.memAccess == "private":
return True
return False
################## ##################
# Default config # # Default config #