diff options
author | Uri Lublin <uril@qumranet.com> | 2007-12-10 20:22:33 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-12-11 16:44:08 +0200 |
commit | 52afb42267985c37447ebcf7a3b4cbc0c947fa39 (patch) | |
tree | dd8263cfbcb5ac21f87f4778e2f17b6c94fb0be7 /libkvm/libkvm.h | |
parent | c0500f5755a7755731c6bc45eff65c5672a42ab5 (diff) |
kvm: libkvm/qemu: get dirty-page-bitmap based on address range not slot
Since c79baa60813812e8d0e34d998d609e848c093000 qemu does not know
about slots, it uses addresses. Getting the dirty-page-bitmap needs to
adapt to that change.
The user (qemu) requests (from libkvm) dirty page log for all
pages within a specific address range (specifically [0,phys_ram_size-1]).
libkvm iterates through all slots in the address range, calling
a qemu-kvm callback to update qemu's bytemap for each slot within
the requested range.
Signed-off-by: Izik Eidus <izike@qumranet.com>
Signed-off-by: Uri Lublin <uril@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'libkvm/libkvm.h')
-rw-r--r-- | libkvm/libkvm.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libkvm/libkvm.h b/libkvm/libkvm.h index ff260f47..d999ce94 100644 --- a/libkvm/libkvm.h +++ b/libkvm/libkvm.h @@ -423,7 +423,10 @@ int kvm_register_userspace_phys_mem(kvm_context_t kvm, unsigned long phys_start, void *userspace_addr, unsigned long len, int log); int kvm_get_dirty_pages(kvm_context_t, unsigned long phys_addr, void *buf); - +int kvm_get_dirty_pages_range(kvm_context_t kvm, unsigned long phys_addr, + unsigned long end_addr, void *buf, void*opaque, + int (*cb)(unsigned long start, unsigned long len, + void*bitmap, void *opaque)); /*! * \brief Create a memory alias |