提交 b533f658 编写于 作者: M Mario Smarduch 提交者: Michael Tokarev

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: NMario Smarduch <m.smarduch@samsung.com>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 a443bc34
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册