From patchwork Tue Feb 23 16:31:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 8394281 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC1E69F52D for ; Tue, 23 Feb 2016 16:34:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE2692034E for ; Tue, 23 Feb 2016 16:34:11 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 459AD20328 for ; Tue, 23 Feb 2016 16:34:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aYFsM-0002J3-2E; Tue, 23 Feb 2016 16:31:50 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aYFsK-0002Ie-PZ for xen-devel@lists.xen.org; Tue, 23 Feb 2016 16:31:48 +0000 Received: from [85.158.139.211] by server-5.bemta-5.messagelabs.com id 73/16-03549-3798CC65; Tue, 23 Feb 2016 16:31:47 +0000 X-Env-Sender: prvs=8544ffb4f=Andrew.Cooper3@citrix.com X-Msg-Ref: server-13.tower-206.messagelabs.com!1456245104!24178922!2 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: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 58788 invoked from network); 23 Feb 2016 16:31:47 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-13.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 23 Feb 2016 16:31:47 -0000 X-IronPort-AV: E=Sophos;i="5.22,490,1449532800"; d="scan'208";a="340282594" From: Andrew Cooper To: Xen-devel Date: Tue, 23 Feb 2016 16:31:20 +0000 Message-ID: <1456245085-2302-4-git-send-email-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456245085-2302-1-git-send-email-andrew.cooper3@citrix.com> References: <1456245085-2302-1-git-send-email-andrew.cooper3@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Andrew Cooper , Jan Beulich Subject: [Xen-devel] [PATCH v2 3/8] xen/x86: Construct the {l2, l3}_bootmap at compile time X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ... rather than at runtime. The bootmaps are discarded in zap_low_mappings(), so the tables themselves can live in .init.data and be reclaimed after boot. Hooking the l1_identmap into l2_xenmap stays for safety, along with a longer comment explaining why. Signed-off-by: Andrew Cooper --- CC: Jan Beulich New in v2 --- xen/arch/x86/boot/head.S | 18 +++++------------- xen/arch/x86/boot/x86_64.S | 19 +++++++++++++++++++ xen/arch/x86/x86_64/mm.c | 4 ---- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index ac4962b..f3501fd 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -150,21 +150,13 @@ __start: mov %eax,sym_phys(boot_tsc_stamp) mov %edx,sym_phys(boot_tsc_stamp+4) - /* Initialise L2 boot-map page table entries (16MB). */ - mov $sym_phys(l2_bootmap),%edx - mov $PAGE_HYPERVISOR|_PAGE_PSE,%eax - mov $8,%ecx -1: mov %eax,(%edx) - add $8,%edx - add $(1<