From patchwork Tue Feb 14 18:33:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kiper X-Patchwork-Id: 9572485 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 1B50160578 for ; Tue, 14 Feb 2017 18:37:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FC7A205A8 for ; Tue, 14 Feb 2017 18:37:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04BFA28443; Tue, 14 Feb 2017 18:37:15 +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 DA463205A8 for ; Tue, 14 Feb 2017 18:37:13 +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 1cdhw3-0002Ea-TL; Tue, 14 Feb 2017 18:34:43 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdhw1-0002DH-Tb for xen-devel@lists.xenproject.org; Tue, 14 Feb 2017 18:34:42 +0000 Received: from [85.158.143.35] by server-7.bemta-6.messagelabs.com id 71/E4-29440-1CD43A85; Tue, 14 Feb 2017 18:34:41 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRWlGSWpSXmKPExsUyZ7p8oO4B38U RBmfXmFl83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBmnvm1kK9jAVXHs2yq2BsYb7F2MXBxCAhOZ JBbM7mGBcH4zSvz9twPK2cgo0bp1NytUGaPErvufmboYOTnYBHQkLn55yA5iiwgoSdxbNZkJp IhZYCaTxOk7J1lAEsICbhJrNv1lBbFZBFQlJt/rYgSxeQXcJWau/wZWIyGgKNH9bAIbiM0p4C Gx8VkHM4gtBFSz91ArVI2hxOeNS5knMPItYGRYxahRnFpUllqka2ysl1SUmZ5RkpuYmaNraGC ml5taXJyYnpqTmFSsl5yfu4kRGC4MQLCDcef6wEOMkhxMSqK8dkKLI4T4kvJTKjMSizPii0pz UosPMcpwcChJ8Fb5AOUEi1LTUyvSMnOAgQuTluDgURLhnQ6S5i0uSMwtzkyHSJ1iVJQS590Mk hAASWSU5sG1waLlEqOslDAvI9AhQjwFqUW5mSWo8q8YxTkYlYR5y0Gm8GTmlcBNfwW0mAloMW vcQpDFJYkIKakGxo2LC0rfJ3wSumAhruMZ87Vwu/nbMJdlCqd/X3LPsxOryPYSFFg9+9L0fe+ PMnQUBsVPkam5wceS89YqdHa8nrbIYati8S93NgdyfzW3XfjgNx8bX4bKnQPfInfpuOy92d/Z 9v9szJH8o+ZLzkQveXYh/O/3DQvFr1sJSp19ylt+Y/qiQ5wrFyqxFGckGmoxFxUnAgDyexbPk QIAAA== X-Env-Sender: daniel.kiper@oracle.com X-Msg-Ref: server-10.tower-21.messagelabs.com!1487097279!51102542!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 31776 invoked from network); 14 Feb 2017 18:34:40 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-10.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 14 Feb 2017 18:34:40 -0000 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v1EIYTlN008366 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Feb 2017 18:34:29 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v1EIYSkd003621 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Feb 2017 18:34:28 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v1EIYRVP022266; Tue, 14 Feb 2017 18:34:27 GMT Received: from olila.local.net-space.pl (/10.175.236.150) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 14 Feb 2017 10:34:26 -0800 From: Daniel Kiper To: xen-devel@lists.xenproject.org Date: Tue, 14 Feb 2017 19:33:26 +0100 Message-Id: <1487097209-19552-8-git-send-email-daniel.kiper@oracle.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1487097209-19552-1-git-send-email-daniel.kiper@oracle.com> References: <1487097209-19552-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, 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 v15 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 525ce7a..a5ce926 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));