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

Re: [Xen-devel] [PATCH 0/3] x86: nuke PV superpage support



On Mon, Jul 24, 2017 at 04:22:52PM +0100, Wei Liu wrote:
> On Mon, Jul 24, 2017 at 04:01:55PM +0100, Andrew Cooper wrote:
> > On 24/07/17 15:44, Wei Liu wrote:
> > > On Mon, Jul 24, 2017 at 03:25:22PM +0100, Andrew Cooper wrote:
> > >> On 24/07/17 15:02, Wei Liu wrote:
> > >>> Wei Liu (3):
> > >>>   x86: nuke PV superpage option and code
> > >>>   tools: nuke superpage parameters in code
> > >>>   docs: delete PV superpage option
> > >> If you are doing this, can you modify
> > >> xc_sr_save_x86_pv.c:normalise_pagetable() to fail immediately if a
> > >> superpage is found.  Currently, this condition is deferred until the
> > >> live phase is complete.
> > >>
> > > Why was it done like that in the first place?
> > 
> > Because if a PV guest shatters all of its superpages during the live
> > phase, it can be successfully moved.
> > 
> > This work was mixed up in the question of the time as to whether PV
> > migraiton worked with superpages at all, seeing as the legacy code took
> > a (non-working) stab at attempting the migration.
> > 
> 
> OK. This makes sense. I will submit a separate patch for the thing you
> asked for, since it is more like an improvement to the code.

---8<---
From fd4934b754eb3a1b8a98167aa4432a105caac185 Mon Sep 17 00:00:00 2001
From: Wei Liu <wei.liu2@xxxxxxxxxx>
Date: Mon, 24 Jul 2017 16:35:09 +0100
Subject: [PATCH] libxc: bail immediately when PV superpage is discovered

The original code was added with the hope that PV superpage migration
might work. But it was never proven that the code actually worked.

Now that PV superpage is gone, simplify the code by returning error
immediately.

Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxc/xc_sr_save_x86_pv.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/tools/libxc/xc_sr_save_x86_pv.c b/tools/libxc/xc_sr_save_x86_pv.c
index 36b10583d6..ff5efe954b 100644
--- a/tools/libxc/xc_sr_save_x86_pv.c
+++ b/tools/libxc/xc_sr_save_x86_pv.c
@@ -975,14 +975,9 @@ static int normalise_pagetable(struct xc_sr_context *ctx, 
const uint64_t *src,
 
             if ( (type > XEN_DOMCTL_PFINFO_L1TAB) && (pte & _PAGE_PSE) )
             {
-                if ( !ctx->dominfo.paused )
-                    errno = EAGAIN;
-                else
-                {
-                    ERROR("Cannot migrate superpage (L%lu[%u]: 
0x%016"PRIx64")",
-                          type >> XEN_DOMCTL_PFINFO_LTAB_SHIFT, i, pte);
-                    errno = E2BIG;
-                }
+                ERROR("Cannot migrate superpage (L%lu[%u]: 0x%016"PRIx64")",
+                      type >> XEN_DOMCTL_PFINFO_LTAB_SHIFT, i, pte);
+                errno = E2BIG;
                 return -1;
             }
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.