diff options
author | Mario Smarduch <m.smarduch@samsung.com> | 2015-01-15 15:58:53 -0800 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2015-01-16 14:40:14 +0100 |
commit | ba0513b5b8ffbcb0cc89e2f172c0bcb70497ba2e (patch) | |
tree | ecc95c1fc9bc4b2d6247e02edb674277966dbdb9 /include/linux/kvm_host.h | |
parent | a6d5101661c88d642b1fc85657fb0c58da821aa7 (diff) | |
download | lwn-ba0513b5b8ffbcb0cc89e2f172c0bcb70497ba2e.tar.gz lwn-ba0513b5b8ffbcb0cc89e2f172c0bcb70497ba2e.zip |
KVM: Add generic support for dirty page logging
kvm_get_dirty_log() provides generic handling of dirty bitmap, currently reused
by several architectures. Building on that we intrdoduce
kvm_get_dirty_log_protect() adding write protection to mark these pages dirty
for future write access, before next KVM_GET_DIRTY_LOG ioctl call from user
space.
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Mario Smarduch <m.smarduch@samsung.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 26f106022c88..3b934cc94cc8 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -611,6 +611,15 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext); int kvm_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log, int *is_dirty); + +int kvm_get_dirty_log_protect(struct kvm *kvm, + struct kvm_dirty_log *log, bool *is_dirty); + +void kvm_arch_mmu_write_protect_pt_masked(struct kvm *kvm, + struct kvm_memory_slot *slot, + gfn_t gfn_offset, + unsigned long mask); + int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log); |