aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-04-27 14:51:31 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-06-05 17:09:59 +0200
commitea8cb1a8d98f5e3822a23a7cecdb4add0f29178b (patch)
treeb70a1eb90cccc738000dd117e5d7d168fc4c6fa1 /kvm-all.c
parent677e7805cf95f3b2bca8baf0888d1ebed7f0c606 (diff)
downloadqemu-ea8cb1a8d98f5e3822a23a7cecdb4add0f29178b.zip
qemu-ea8cb1a8d98f5e3822a23a7cecdb4add0f29178b.tar.gz
qemu-ea8cb1a8d98f5e3822a23a7cecdb4add0f29178b.tar.bz2
kvm: accept non-mapped memory in kvm_dirty_pages_log_change
It is okay if memory is not mapped into the guest but has dirty logging enabled. When this happens, KVM will not do anything and only accesses from the host will be logged. This can be triggered by iofuzz. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/kvm-all.c b/kvm-all.c
index c713b22..36e8109 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -335,12 +335,10 @@ static int kvm_dirty_pages_log_change(hwaddr phys_addr,
KVMSlot *mem = kvm_lookup_matching_slot(s, phys_addr, phys_addr + size);
if (mem == NULL) {
- fprintf(stderr, "BUG: %s: invalid parameters " TARGET_FMT_plx "-"
- TARGET_FMT_plx "\n", __func__, phys_addr,
- (hwaddr)(phys_addr + size - 1));
- return -EINVAL;
+ return 0;
+ } else {
+ return kvm_slot_dirty_pages_log_change(mem, log_dirty);
}
- return kvm_slot_dirty_pages_log_change(mem, log_dirty);
}
static void kvm_log_start(MemoryListener *listener,