From patchwork Wed Jul 26 07:44:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9864339 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C68376038C for ; Wed, 26 Jul 2017 07:47:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5D4C2873E for ; Wed, 26 Jul 2017 07:47:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA27628743; Wed, 26 Jul 2017 07:47:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 770C728740 for ; Wed, 26 Jul 2017 07:47:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daH0C-0006kj-NF; Wed, 26 Jul 2017 07:45:04 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daH0B-0006jx-Ms for xen-devel@lists.xenproject.org; Wed, 26 Jul 2017 07:45:03 +0000 Received: from [85.158.137.68] by server-17.bemta-3.messagelabs.com id 0C/6E-01859-E7848795; Wed, 26 Jul 2017 07:45:02 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOIsWRWlGSWpSXmKPExsXitHSDvW6dR0W kwbbpMhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8b8+10sBTO5K+68sm1gbOLoYuTkkBDwl1j8 /w4riM0moCzxs7OXDcQWEdCTaDrwnLGLkYuDWeAbo8SpCbcZQRLCQA1tDQ3sIDaLgKrEkxXTm EBsXgELibu3JzJBDJWX2NV2EWwop4ClxOLFbSwgthBQzf8V69kgbAWJjunHoHoFJU7OfAJWwy wgIXHwxQvmCYy8s5CkZiFJLWBkWsWoUZxaVJZapGtkrpdUlJmeUZKbmJmja2hgrJebWlycmJ6 ak5hUrJecn7uJERg89QwMjDsYW/b6HWKU5GBSEuWdZFoRKcSXlJ9SmZFYnBFfVJqTWnyIUYaD Q0mCd6I7UE6wKDU9tSItMwcYxjBpCQ4eJRHeNpA0b3FBYm5xZjpE6hSjMceMVbu/MHG8mvD/G 5MQS15+XqqUOG8DSKkASGlGaR7cIFh8XWKUlRLmZWRgYBDiKUgtys0sQZV/xSjOwagkzKsOMo UnM68Ebt8roFOYgE6ZM6MU5JSSRISUVAOjjEzrronK57o+VhxZneSu8XfH+xqhIP7+LZnH5qz dGn/qzzVWe2XftRvbr8169/i06NnVbquYercmrAtPa7TbdCp4j3viv8VXbXSnzc/qFw4yUgzN iTs1QX4VT4Ty6gXGxsX6WjHLTs94PEv21rrEtbK3hOexTGstDXlx0jlWwM7L2KO65nuiEktxR qKhFnNRcSIA8X/sKKoCAAA= X-Env-Sender: prvs=373b709cc=wei.liu2@citrix.com X-Msg-Ref: server-12.tower-31.messagelabs.com!1501055098!90339793!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 54449 invoked from network); 26 Jul 2017 07:45:02 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-12.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 26 Jul 2017 07:45:02 -0000 X-IronPort-AV: E=Sophos;i="5.40,414,1496102400"; d="scan'208";a="441340471" From: Wei Liu To: Xen-devel Date: Wed, 26 Jul 2017 08:44:56 +0100 Message-ID: <20170726074456.25511-4-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170726074456.25511-1-wei.liu2@citrix.com> References: <20170726074456.25511-1-wei.liu2@citrix.com> MIME-Version: 1.0 Cc: Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich Subject: [Xen-devel] [PATCH v2 3/3] libxc: bail immediately when PV superpage is discovered X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Wei Liu Reviewed-by: Andrew Cooper --- 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; }