mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Add a "discard_writes=" to --pmem
This opens the backing file read-only, makes the pages in the mmap() read-only and also makes the KVM mapping read-only. The file is also mapped with MAP_PRIVATE to make the changes local to this process only. This is functional alternative to having support for making a virtio-pmem device readonly. Unfortunately there is no concept of readonly virtio-pmem (or any type of NVDIMM/PMEM) in the Linux kernel so to be able to have a block device that is appears readonly in the guest requires significant specification and kernel changes. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
d11a67b0fe
commit
f7197e8415
@@ -173,7 +173,7 @@ fn create_app<'a, 'b>(
|
||||
.help(
|
||||
"Persistent memory parameters \
|
||||
\"file=<backing_file_path>,size=<persistent_memory_size>,iommu=on|off,\
|
||||
mergeable=on|off\"",
|
||||
mergeable=on|off,discard_writes=on|off,\"",
|
||||
)
|
||||
.takes_value(true)
|
||||
.min_values(1)
|
||||
|
||||
Reference in New Issue
Block a user