qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [PATCH] spapr: Fix stale HTAB during live migration


From: Samuel Mendoza-Jonas
Subject: [Qemu-ppc] [PATCH] spapr: Fix stale HTAB during live migration
Date: Mon, 18 Aug 2014 13:18:53 +1000

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]