diff options
author | Zach Reizner <zachr@google.com> | 2018-01-02 13:34:03 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-03 16:54:34 -0800 |
commit | 855ac29cf2419d475f93c14deba17f8b501b814b (patch) | |
tree | 0665ccbe6fe5ebce53420f205f4977a0f89c8b6f /vm_control | |
parent | 20c3c2af2fa5939417efb994d712f77d84c1dac1 (diff) | |
download | crosvm-855ac29cf2419d475f93c14deba17f8b501b814b.tar crosvm-855ac29cf2419d475f93c14deba17f8b501b814b.tar.gz crosvm-855ac29cf2419d475f93c14deba17f8b501b814b.tar.bz2 crosvm-855ac29cf2419d475f93c14deba17f8b501b814b.tar.lz crosvm-855ac29cf2419d475f93c14deba17f8b501b814b.tar.xz crosvm-855ac29cf2419d475f93c14deba17f8b501b814b.tar.zst crosvm-855ac29cf2419d475f93c14deba17f8b501b814b.zip |
kvm: add dirty log support
This add safe support for KVM's KVM_GET_DIRTY_LOG ioctl. TEST=./build_test BUG=None Change-Id: I3d0f996927844a33addd072f2bfc62361f8b7fe0 Reviewed-on: https://chromium-review.googlesource.com/848019 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'vm_control')
-rw-r--r-- | vm_control/src/lib.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vm_control/src/lib.rs b/vm_control/src/lib.rs index d486081..bf363e1 100644 --- a/vm_control/src/lib.rs +++ b/vm_control/src/lib.rs @@ -204,10 +204,11 @@ impl VmRequest { _ => return VmResponse::Err(SysError::new(-EINVAL)), }; let pfn = *next_mem_pfn; - let slot = match vm.add_device_memory(GuestAddress((pfn << 12) as usize), mmap) { - Ok(slot) => slot, - Err(e) => return VmResponse::Err(e), - }; + let slot = + match vm.add_device_memory(GuestAddress((pfn << 12) as usize), mmap, false) { + Ok(slot) => slot, + Err(e) => return VmResponse::Err(e), + }; // TODO(zachr): Use a smarter allocation strategy. The current strategy is just // bumping this pointer, meaning the remove operation does not free any address // space. Given enough allocations, device memory may run out of address space and |