From: "Serge E. Hallyn" <serge@hallyn.com>
To: Serge Hallyn <serge.hallyn@ubuntu.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>,
qemu-devel@nongnu.org, 1303926@bugs.launchpad.net,
Mario Smarduch <m.smarduch@samsung.com>
Subject: Re: [Qemu-devel] [PATCH 1/1] kvm_physical_sync_dirty_bitmap: ignore ENOENT from kvm_vm_ioctl
Date: Wed, 9 Apr 2014 05:31:48 +0200 [thread overview]
Message-ID: <20140409033148.GA15339@mail.hallyn.com> (raw)
In-Reply-To: <20140409032106.GA5163@sergelap>
D'oh, sorry. I generated that patch against my qemu tree at the bad_commit^.
That won't apply to the tree... this should.
>From 0d818e334f6db88b2770e9a1076ae1e68c41e460 Mon Sep 17 00:00:00 2001
From: Serge Hallyn <serge.hallyn@ubuntu.com>
Date: Tue, 8 Apr 2014 22:14:20 -0500
Subject: [PATCH 1/1] kvm_physical_sync_dirty_bitmap: ignore ENOENT from
kvm_vm_ioctl
ENOENT (iiuc) means the kernel has an empty dirty bitmap for this
slot. Don't abort in that case. This appears to solve the bug
reported at
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1303926
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
---
kvm-all.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: qemu-2.0.0~rc1+dfsg/kvm-all.c
===================================================================
--- qemu-2.0.0~rc1+dfsg.orig/kvm-all.c 2014-04-08 22:28:38.000722081 -0500
+++ qemu-2.0.0~rc1+dfsg/kvm-all.c 2014-04-08 22:29:14.644722904 -0500
@@ -441,10 +441,13 @@ static int kvm_physical_sync_dirty_bitma
d.slot = mem->slot;
- if (kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) < 0) {
+ ret = kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d);
+ if (ret < 0 && ret != -ENOENT) {
DPRINTF("ioctl failed %d\n", errno);
ret = -1;
break;
+ } else if (ret < 0) {
+ ret = 0;
}
kvm_get_dirty_pages_log_range(section, d.dirty_bitmap);
next prev parent reply other threads:[~2014-04-09 3:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-09 3:21 [Qemu-devel] [PATCH 1/1] kvm_physical_sync_dirty_bitmap: ignore ENOENT from kvm_vm_ioctl Serge Hallyn
2014-04-09 3:31 ` Serge E. Hallyn [this message]
2014-04-10 16:30 ` Michael Tokarev
2014-04-10 18:47 ` Serge Hallyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140409033148.GA15339@mail.hallyn.com \
--to=serge@hallyn.com \
--cc=1303926@bugs.launchpad.net \
--cc=m.smarduch@samsung.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=serge.hallyn@ubuntu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).