From patchwork Fri Jan 20 01:34:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kiper X-Patchwork-Id: 9527157 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 ECE136045D for ; Fri, 20 Jan 2017 01:37:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0D6928638 for ; Fri, 20 Jan 2017 01:37:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFDD428683; Fri, 20 Jan 2017 01:37:41 +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, UNPARSEABLE_RELAY 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 42C4228511 for ; Fri, 20 Jan 2017 01:37:40 +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 1cUO6n-0000ky-1e; Fri, 20 Jan 2017 01:35:17 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUO6m-0000kc-LR for xen-devel@lists.xenproject.org; Fri, 20 Jan 2017 01:35:16 +0000 Received: from [193.109.254.147] by server-3.bemta-6.messagelabs.com id C1/87-09053-45961885; Fri, 20 Jan 2017 01:35:16 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNLMWRWlGSWpSXmKPExsXSO6nOVTc4szH C4Np0GYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNaNn9wW2gg1cFc/WFDcw3mDvYuTiEBKYyCTx 4MJNVgjnG6NE89e5zF2MnEDORkaJixdSIewJjBJP59qD2GwCOhIXvzxkB7FFBJQk7q2azATSz Cwwk0ni9J2TLCAJYQE3ifebrjKB2CwCqhKTrzWA2bxA8cVvloLVSAgoSnQ/m8AGYnMKuEusu/ aXCWKZm0TPnGtsEDWGEp83LmWewMi3gJFhFaNGcWpRWWqRrpGhXlJRZnpGSW5iZo6uoYGZXm5 qcXFiempOYlKxXnJ+7iZGYKAwAMEOxj/LAg4xSnIwKYny7v7YECHEl5SfUpmRWJwRX1Sak1p8 iFGGg0NJgrc7ozFCSLAoNT21Ii0zBxiyMGkJDh4lEV4hkDRvcUFibnFmOkTqFKOilDhvIkhCA CSRUZoH1waLk0uMslLCvIxAhwjxFKQW5WaWoMq/YhTnYFQS5pUFmcKTmVcCN/0V0GImoMVWyv Ugi0sSEVJSDYy5Smvyk4JmTi0pORrZoX/udfLNWX96mPlmK55499tOLrlYN5LZ53NkyExus+U dde4cX5ReTxFnFtN9qBghetLpEP+iZbv2cWQU7L5/yH1xtWfe8ckLFbP0ex4HyAgGpnsevFT+ wF17xs/mqQkrzHeqGPtGxUQvep1/e+IPxf+/sj8vj7nNFKnEUpyRaKjFXFScCADP0cO9jgIAA A== X-Env-Sender: daniel.kiper@oracle.com X-Msg-Ref: server-16.tower-27.messagelabs.com!1484876113!82504036!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 20667 invoked from network); 20 Jan 2017 01:35:15 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-16.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 20 Jan 2017 01:35:15 -0000 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v0K1Z2Ik010404 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 20 Jan 2017 01:35:03 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v0K1Z25U016165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 20 Jan 2017 01:35:02 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v0K1Yx36013881; Fri, 20 Jan 2017 01:35:00 GMT Received: from olila.local.net-space.pl (/10.175.176.50) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 Jan 2017 17:34:59 -0800 From: Daniel Kiper To: xen-devel@lists.xenproject.org Date: Fri, 20 Jan 2017 02:34:17 +0100 Message-Id: <1484876060-2236-8-git-send-email-daniel.kiper@oracle.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1484876060-2236-1-git-send-email-daniel.kiper@oracle.com> References: <1484876060-2236-1-git-send-email-daniel.kiper@oracle.com> X-Source-IP: userv0022.oracle.com [156.151.31.74] Cc: jgross@suse.com, sstabellini@kernel.org, konrad.wilk@oracle.com, andrew.cooper3@citrix.com, cardoe@cardoe.com, pgnet.dev@gmail.com, ning.sun@intel.com, julien.grall@arm.com, jbeulich@suse.com, qiaowei.ren@intel.com, gang.wei@intel.com, fu.wei@linaro.org Subject: [Xen-devel] [PATCH v12 07/10] x86/setup: use XEN_IMG_OFFSET instead of... 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP ..calculating its value during runtime. Signed-off-by: Daniel Kiper Acked-by: Jan Beulich Reviewed-by: Doug Goldstein --- xen/arch/x86/setup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index e6f6ef1..24b4b23 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -943,7 +943,6 @@ void __init noreturn __start_xen(unsigned long mbi_p) l4_pgentry_t *pl4e; l3_pgentry_t *pl3e; l2_pgentry_t *pl2e; - uint64_t load_start; int i, j, k; /* Select relocation address. */ @@ -957,9 +956,8 @@ void __init noreturn __start_xen(unsigned long mbi_p) * with a barrier(). After this we must *not* modify static/global * data until after we have switched to the relocated pagetables! */ - load_start = (unsigned long)_start - XEN_VIRT_START; barrier(); - move_memory(e + load_start, load_start, _end - _start, 1); + move_memory(e + XEN_IMG_OFFSET, XEN_IMG_OFFSET, _end - _start, 1); /* Walk initial pagetables, relocating page directory entries. */ pl4e = __va(__pa(idle_pg_table));