Signed-off-by: Avi Kivity <avi@xxxxxxxxxx> --- api/kvmxx.cc | 8 ++++++++ api/kvmxx.hh | 1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/api/kvmxx.cc b/api/kvmxx.cc index 42e8781..7ebebb5 100644 --- a/api/kvmxx.cc +++ b/api/kvmxx.cc @@ -163,6 +163,14 @@ void vm::set_memory_region(int slot, void *addr, uint64_t gpa, size_t len, _fd.ioctlp(KVM_SET_USER_MEMORY_REGION, &umr); } +void vm::get_dirty_log(int slot, void *log) +{ + struct kvm_dirty_log kdl; + kdl.slot = slot; + kdl.dirty_bitmap = log; + _fd.ioctlp(KVM_GET_DIRTY_LOG, &kdl); +} + void vm::set_tss_addr(uint32_t addr) { _fd.ioctl(KVM_SET_TSS_ADDR, addr); diff --git a/api/kvmxx.hh b/api/kvmxx.hh index 958d36f..1dcb41d 100644 --- a/api/kvmxx.hh +++ b/api/kvmxx.hh @@ -59,6 +59,7 @@ public: explicit vm(system& system); void set_memory_region(int slot, void *addr, uint64_t gpa, size_t len, uint32_t flags = 0); + void get_dirty_log(int slot, void *log); void set_tss_addr(uint32_t addr); system& sys() { return _system; } private: -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html