qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] spapr: Fix stale HTAB during live migration
@ 2014-08-18  3:18 Samuel Mendoza-Jonas
  2014-08-18 10:31 ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Mendoza-Jonas @ 2014-08-18  3:18 UTC (permalink / raw)
  To: qemu-devel, qemu-ppc; +Cc: aik, Samuel Mendoza-Jonas

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

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

end of thread, other threads:[~2014-08-18 10:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-18  3:18 [Qemu-devel] [PATCH] spapr: Fix stale HTAB during live migration Samuel Mendoza-Jonas
2014-08-18 10:31 ` Dr. David Alan Gilbert

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).