From patchwork Thu Feb 2 22:01:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kiper X-Patchwork-Id: 9553277 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 64D3360236 for ; Thu, 2 Feb 2017 22:04:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5176728437 for ; Thu, 2 Feb 2017 22:04:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 441AE284BC; Thu, 2 Feb 2017 22:04: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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM,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 A0B9B28437 for ; Thu, 2 Feb 2017 22:04: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 1cZPSW-000459-UX; Thu, 02 Feb 2017 22:02:28 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZPSV-000442-P0 for xen-devel@lists.xenproject.org; Thu, 02 Feb 2017 22:02:27 +0000 Received: from [85.158.143.35] by server-8.bemta-6.messagelabs.com id 12/F4-21675-37CA3985; Thu, 02 Feb 2017 22:02:27 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrDLMWRWlGSWpSXmKPExsXSO6nOVbdozeQ Ig2evZS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oye3RfYCjZwVTxbU9zAeIO9i5GTQ0ignUni wQTPLkYuIPsro8TpzifsEM4GRolNm0+zQTgTGSU+/J7OBNLCJqAjcfHLQ7B2EQEliXurJjOBF DEL7GOSWLRmBxtIQljARaJ78USwBhYBVYm2X0+ZQWxeAXeJ7m9TWEBsCQFFie5nE8DqOQU8JH rfbmGGuMld4t/cb4wQNcYSfbP6WCYw8i1gZFjFqFGcWlSWWqRrZKmXVJSZnlGSm5iZo2toYKa Xm1pcnJiempOYVKyXnJ+7iREYKgxAsIPxwKLAQ4ySHExKorw/F06OEOJLyk+pzEgszogvKs1J LT7EKMPBoSTBO3c1UE6wKDU9tSItMwcYtDBpCQ4eJRFeoDcjhHiLCxJzizPTIVKnGBWlxHlbQ PoEQBIZpXlwbbBIucQoKyXMywh0iBBPQWpRbmYJqvwrRnEORiVh3vsg43ky80rgpr8CWswEtP jn40kgi0sSEVJSDYx5jlsPFdYsvm9SXW+uGfD69aPc6aK9pmJ1Zzq0bx/4t6huavWFRrN9DlO tGk5vuD+lP8r7iZA0Z/VqUV5X291CHWpGDaHTVlXMF41cF/3LV/NrT77TVUOWO3sT/h7dzXqx vPqM0FGlis7Z60zfzDmvVpybdSneyl2OJ085vU5wZbW/yqlZr5VYijMSDbWYi4oTAW1n8ZWPA gAA X-Env-Sender: daniel.kiper@oracle.com X-Msg-Ref: server-16.tower-21.messagelabs.com!1486072944!51358730!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 50996 invoked from network); 2 Feb 2017 22:02:26 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-16.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 2 Feb 2017 22:02:26 -0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v12M2C0Q031415 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 2 Feb 2017 22:02:12 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v12M2Ce1031705 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 2 Feb 2017 22:02:12 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v12M2AZM027728; Thu, 2 Feb 2017 22:02:11 GMT Received: from olila.local.net-space.pl (/10.175.161.206) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 02 Feb 2017 14:02:09 -0800 From: Daniel Kiper To: xen-devel@lists.xenproject.org Date: Thu, 2 Feb 2017 23:01:16 +0100 Message-Id: <1486072879-31637-7-git-send-email-daniel.kiper@oracle.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1486072879-31637-1-git-send-email-daniel.kiper@oracle.com> References: <1486072879-31637-1-git-send-email-daniel.kiper@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] Cc: jgross@suse.com, sstabellini@kernel.org, andrew.cooper3@citrix.com, cardoe@cardoe.com, marcos.matsunaga@oracle.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 v14 6/9] 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));