vmm: Create guest memory regions with explicit dirty-pages-log flags

As we are now using an global control to start/stop dirty pages log from
the `hypervisor` crate, we need to explicitly tell the hypervisor (KVM)
whether a region needs dirty page tracking when it is created.

This reverts commit f063346de3.

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2021-07-26 11:30:01 -07:00
committed by Bo Chen
parent e7c9954dc1
commit b00a6a8519
3 changed files with 30 additions and 3 deletions

View File

@@ -2233,7 +2233,9 @@ impl DeviceManager {
.memory_manager
.lock()
.unwrap()
.create_userspace_mapping(cache_base, cache_size, host_addr, false, false)
.create_userspace_mapping(
cache_base, cache_size, host_addr, false, false, false,
)
.map_err(DeviceManagerError::MemoryManager)?;
let region_list = vec![VirtioSharedMemory {
@@ -2425,6 +2427,7 @@ impl DeviceManager {
host_addr,
pmem_cfg.mergeable,
false,
false,
)
.map_err(DeviceManagerError::MemoryManager)?;