From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Jan Beulich <JBeulich@suse.com>
Subject: [PATCH v2 3/3] libxc: bail immediately when PV superpage is discovered
Date: Wed, 26 Jul 2017 08:44:56 +0100 [thread overview]
Message-ID: <20170726074456.25511-4-wei.liu2@citrix.com> (raw)
In-Reply-To: <20170726074456.25511-1-wei.liu2@citrix.com>
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>
---
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@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2017-07-26 7:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-26 7:44 [PATCH v2 0/3] x86: nuke PV superpage support Wei Liu
2017-07-26 7:44 ` [PATCH v2 1/3] x86: nuke PV superpage option and code Wei Liu
2017-07-26 16:19 ` Andrew Cooper
2017-07-26 16:37 ` Wei Liu
2017-07-26 19:33 ` Konrad Rzeszutek Wilk
2017-07-26 7:44 ` [PATCH v2 2/3] tools: nuke superpage parameters in code Wei Liu
2017-07-26 7:44 ` Wei Liu [this message]
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=20170726074456.25511-4-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=xen-devel@lists.xenproject.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).