From: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: aik@ozlabs.ru, Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Subject: [Qemu-devel] [PATCH] spapr: Fix stale HTAB during live migration
Date: Mon, 18 Aug 2014 13:18:53 +1000 [thread overview]
Message-ID: <1408331933-11845-1-git-send-email-sam.mj@au1.ibm.com> (raw)
If a guest reboots during a running migration, changes to the
hash page table are not necessarily updated on the destination.
Opening a new file descriptor to the HTAB forces the migration
handler to resend the entire table.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
---
hw/ppc/spapr.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 3a6d26d..7733b37 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -997,6 +997,12 @@ static void spapr_reset_htab(sPAPREnvironment *spapr)
/* Kernel handles htab, we don't need to allocate one */
spapr->htab_shift = shift;
kvmppc_kern_htab = true;
+
+ /* Make sure readers are aware of the reset */
+ if (spapr->htab_fd > 0) {
+ close(spapr->htab_fd);
+ spapr->htab_fd = kvmppc_get_htab_fd(false);
+ }
} else {
if (!spapr->htab) {
/* Allocate an htab if we don't yet have one */
--
1.9.3
next reply other threads:[~2014-08-18 3:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-18 3:18 Samuel Mendoza-Jonas [this message]
2014-08-18 10:31 ` [Qemu-devel] [PATCH] spapr: Fix stale HTAB during live migration Dr. David Alan Gilbert
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=1408331933-11845-1-git-send-email-sam.mj@au1.ibm.com \
--to=sam.mj@au1.ibm.com \
--cc=aik@ozlabs.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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).