summaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorMario Smarduch <m.smarduch@samsung.com>2014-03-19 10:24:26 -0700
committerMichael Tokarev <mjt@tls.msk.ru>2014-03-27 19:22:48 +0400
commitb533f658a98325d0e47b36113bd9f5bcc046fdae (patch)
tree24eb32a52fa67dd77553b00a865d35689428497f /kvm-all.c
parenta443bc3496658c9e144ad914933607ebc8418979 (diff)
downloadqemu-b533f658a98325d0e47b36113bd9f5bcc046fdae.tar.gz
qemu-b533f658a98325d0e47b36113bd9f5bcc046fdae.tar.bz2
qemu-b533f658a98325d0e47b36113bd9f5bcc046fdae.zip
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 <m.smarduch@samsung.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c2
1 files changed, 1 insertions, 1 deletions
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;