diff options
author | Cole Robinson <crobinso@redhat.com> | 2022-01-25 11:50:05 -0500 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2022-01-25 12:43:32 -0500 |
commit | 9c45f4a2e99c1a6ef3ae8c522ce0285c88a420bb (patch) | |
tree | 62f0c27924dfb35742af89edcfb1af6fabd454a5 /virtinst/domain | |
parent | 3d915717ddc6ad85b178b689a8d2390469c9278d (diff) | |
download | virt-manager-9c45f4a2e99c1a6ef3ae8c522ce0285c88a420bb.tar.gz |
details: Strip back 'Enable shared memory' to only cover memfd
Strip back the logic to:
* Only try to toggle source_type=memfd and access_mode=shared
* Disable the field if guest has any <numa> config
* Disable the field if domcaps does not report virtiofs and memfd
This is the simplest future proof case, though it will exclude some
legit guest configs and some libvirt+qemu back compat.
My feeling is the <numa> stuff in particular is pretty advanced, so if
users have it configured they can toggle shared memory via the XML
without too much trouble.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Diffstat (limited to 'virtinst/domain')
-rw-r--r-- | virtinst/domain/cpu.py | 14 | ||||
-rw-r--r-- | virtinst/domain/memorybacking.py | 3 |
2 files changed, 0 insertions, 17 deletions
diff --git a/virtinst/domain/cpu.py b/virtinst/domain/cpu.py index fc05c5d0..22a90d3a 100644 --- a/virtinst/domain/cpu.py +++ b/virtinst/domain/cpu.py @@ -412,20 +412,6 @@ class DomainCpu(XMLBuilder): return 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 - - 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 - ################## # Default config # diff --git a/virtinst/domain/memorybacking.py b/virtinst/domain/memorybacking.py index 60e97da4..c883c57d 100644 --- a/virtinst/domain/memorybacking.py +++ b/virtinst/domain/memorybacking.py @@ -36,6 +36,3 @@ class DomainMemoryBacking(XMLBuilder): allocation_mode = XMLProperty("./allocation/@mode") pages = XMLChildProperty(_HugepagesPage, relative_xpath="./hugepages") - - def is_shared_access(self): - return self.access_mode == "shared" |