From patchwork Thu Sep 29 21:42:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kiper X-Patchwork-Id: 9357153 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 6BF3F6077B for ; Thu, 29 Sep 2016 21:45:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 601F329C78 for ; Thu, 29 Sep 2016 21:45:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54DFD29C79; Thu, 29 Sep 2016 21:45:52 +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 DF89129C76 for ; Thu, 29 Sep 2016 21:45:51 +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 1bpj7N-0003eG-Vb; Thu, 29 Sep 2016 21:43:49 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpj7M-0003cw-KX for xen-devel@lists.xenproject.org; Thu, 29 Sep 2016 21:43:48 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id 2A/F5-11394-31B8DE75; Thu, 29 Sep 2016 21:43:47 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLLMWRWlGSWpSXmKPExsUyZ7p8oK5w99t wg0cbuC2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oybNzuZChq4Kr5u2c3awLiGvYuRi0NIoI1J oufnfVYI5wujxPrVDUwQzkZGiW8r7jNDOBMZJY6uuQHkcHKwCehIXPzykB3EFhFQkri3ajJYB 7PALiaJU5c3MoIkhAVcJR5+PcwGYrMIqEp0LDoAZvMKeEhMmL4OrFlCQFGi+9kEsDgnUHxGww uwXiEBd4m+Y7+gagwlTj/cxjiBkW8BI8MqRvXi1KKy1CJdE72kosz0jJLcxMwcXUMDY73c1OL ixPTUnMSkYr3k/NxNjMBgYQCCHYyNX5wOMUpyMCmJ8p4OfBsuxJeUn1KZkVicEV9UmpNafIhR hoNDSYKXtwsoJ1iUmp5akZaZAwxbmLQEB4+SCC8PSJq3uCAxtzgzHSJ1ilFRSpxXBCQhAJLIK M2Da4PFyiVGWSlhXkagQ4R4ClKLcjNLUOVfMYpzMCoJ8yqATOHJzCuBm/4KaDET0OL8o29AFp ckIqSkGhiXvp+is8X+9SaFL3q+NYvjY/5cFVkf2c9nMa+L58Ll8wpbXNfx1XOYOUa6GUV5Zm1 +I/J4yaaf91/pnr9X2rE/xl948UW2R2rP5sxvKUo7vcDWmi1WJObA3823flwr2Ttt2fFDVobG iX5i519f3ma/xXw5l9V+zWXrsx76aO1zztN6+1v7xaUZSizFGYmGWsxFxYkA4R7wzJACAAA= X-Env-Sender: daniel.kiper@oracle.com X-Msg-Ref: server-9.tower-31.messagelabs.com!1475185425!8107638!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: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22295 invoked from network); 29 Sep 2016 21:43:46 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-9.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 29 Sep 2016 21:43:46 -0000 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u8TLha9E020934 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 29 Sep 2016 21:43:36 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u8TLhZxP031574 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 29 Sep 2016 21:43:35 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u8TLhTYg029920; Thu, 29 Sep 2016 21:43:35 GMT Received: from olila.local.net-space.pl (/10.175.208.109) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 29 Sep 2016 14:43:29 -0700 From: Daniel Kiper To: xen-devel@lists.xenproject.org Date: Thu, 29 Sep 2016 23:42:39 +0200 Message-Id: <1475185362-14198-11-git-send-email-daniel.kiper@oracle.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1475185362-14198-1-git-send-email-daniel.kiper@oracle.com> References: <1475185362-14198-1-git-send-email-daniel.kiper@oracle.com> X-Source-IP: userv0021.oracle.com [156.151.31.71] 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, david.vrabel@citrix.com, jbeulich@suse.com, qiaowei.ren@intel.com, gang.wei@intel.com, fu.wei@linaro.org Subject: [Xen-devel] [PATCH v9 10/13] 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 --- 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 eb674c8..f42bf7b 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -899,7 +899,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. */ @@ -913,9 +912,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));