All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [Qemu-devel][PATCH] fix return check for KVM_GET_DIRTY_LOG ioctl
@ 2014-03-19 17:24 ` Mario Smarduch
  0 siblings, 0 replies; 6+ messages in thread
From: Mario Smarduch @ 2014-03-19 17:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial


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>
---
 kvm-all.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kvm-all.c b/kvm-all.c
index 82a9119..cd4111d 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;
-- 
1.7.9.5





^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-03-20 16:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-19 17:24 [Qemu-trivial] [Qemu-devel][PATCH] fix return check for KVM_GET_DIRTY_LOG ioctl Mario Smarduch
2014-03-19 17:24 ` [Qemu-devel] [PATCH] " Mario Smarduch
2014-03-20 15:45 ` [Qemu-trivial] [Qemu-devel][PATCH] " Michael Tokarev
2014-03-20 15:45   ` [Qemu-devel] [Qemu-trivial] [PATCH] " Michael Tokarev
2014-03-20 16:38   ` [Qemu-trivial] [Qemu-devel][PATCH] " Mario Smarduch
2014-03-20 16:38     ` [Qemu-devel] [Qemu-trivial] [PATCH] " Mario Smarduch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.