libxc: bail immediately when PV superpage is discovered
authorWei Liu <wei.liu2@citrix.com>
Wed, 26 Jul 2017 07:44:56 +0000 (08:44 +0100)
committerWei Liu <wei.liu2@citrix.com>
Thu, 27 Jul 2017 10:26:00 +0000 (11:26 +0100)
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@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
tools/libxc/xc_sr_save_x86_pv.c

index 36b10583d6bc334063de479254559e70a9e7b71c..ff5efe954b46e1431aabe10670235a82a84d5a11 100644 (file)
@@ -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;
             }