]> Git Repo - qemu.git/commitdiff
fix return check for KVM_GET_DIRTY_LOG ioctl
authorMario Smarduch <[email protected]>
Wed, 19 Mar 2014 17:24:26 +0000 (10:24 -0700)
committerMichael Tokarev <[email protected]>
Thu, 27 Mar 2014 15:22:48 +0000 (19:22 +0400)
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 <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
kvm-all.c

index 82a91199e11a4544266d956a75fb81dc845d9608..cd4111dbda4049d52297e93d101b8ada2c3cad1d 100644 (file)
--- 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;
This page took 0.030887 seconds and 4 git commands to generate.