vmm: Add "readonly" parameter MemoryManager::create_userspace_mapping

Use this boolean to turn on the KVM_MEM_READONLY flag to indicate that
this memory mapping should not be writable by the VM.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-03-19 10:00:09 +00:00
committed by Sebastien Boeuf
parent 03cb26cc70
commit 7257e890ef
2 changed files with 7 additions and 2 deletions
+2
View File
@@ -1320,6 +1320,7 @@ impl DeviceManager {
fs_cache,
addr,
false,
false,
)
.map_err(DeviceManagerError::MemoryManager)?;
@@ -1417,6 +1418,7 @@ impl DeviceManager {
size,
addr,
pmem_cfg.mergeable,
false,
)
.map_err(DeviceManagerError::MemoryManager)?;