From: Mario Smarduch Date: Wed, 19 Mar 2014 17:24:26 +0000 (-0700) Subject: fix return check for KVM_GET_DIRTY_LOG ioctl X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~386^2~42^2~50^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b533f658a98325d0e47b36113bd9f5bcc046fdae;p=sdk%2Femulator%2Fqemu.git fix return check for KVM_GET_DIRTY_LOG ioctl Fix return condition check from kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) to handle internal failures or no support for memory slot dirty bitmap. Otherwise the ioctl succeeds and continues with migration. Addresses BUG# 1294227 Signed-off-by: Mario Smarduch Signed-off-by: Michael Tokarev --- diff --git a/kvm-all.c b/kvm-all.c index 82a91199e1..cd4111dbda 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -441,7 +441,7 @@ static int kvm_physical_sync_dirty_bitmap(MemoryRegionSection *section) d.slot = mem->slot; - if (kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) == -1) { + if (kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) < 0) { DPRINTF("ioctl failed %d\n", errno); ret = -1; break;