From patchwork Mon Mar 6 20:05:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Ostrovsky X-Patchwork-Id: 9607497 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 2AB8E6046A for ; Mon, 6 Mar 2017 20:07:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 088A027BFF for ; Mon, 6 Mar 2017 20:07:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF6FE27F80; Mon, 6 Mar 2017 20:07:03 +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 BF80827F54 for ; Mon, 6 Mar 2017 20:07:01 +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 1ckysN-00056y-J9; Mon, 06 Mar 2017 20:04:59 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckysM-00056m-Cg for xen-devel@lists.xen.org; Mon, 06 Mar 2017 20:04:58 +0000 Received: from [85.158.143.35] by server-5.bemta-6.messagelabs.com id E3/55-22382-9E0CDB85; Mon, 06 Mar 2017 20:04:57 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGIsWRWlGSWpSXmKPExsXSO6nOVfflgb0 RBktnSFgs+biYxYHR4+ju30wBjFGsmXlJ+RUJrBn9axeyFDRwVXT8aWBtYNzC0cXIxSEkMIFJ 4u7SNSwQzldGiZ5v89ghnA2MEp8WfWOFcLYzSlzavQqojINDWCBJ4vfdZJC4iMAZJokb5zYxd TFyAhXVSqxdMAFsFLPAbCaJpw1bWEASbAJGEmePTmcEsXkFbCUePZ4IFmcRUJHo7f4HFhcVCJ fo2HWNHaJGUOLkzCdgNZwCrhLPVywBq2EW0JPYcf0XK4StLbFs4WtmEFtCwFDi88alzBMYBWc haZ+FpGUWkpYFjMyrGDWKU4vKUot0DY31kooy0zNKchMzc3QNDcz0clOLixPTU3MSk4r1kvNz NzECw5cBCHYwflkWcIhRkoNJSZTXbdneCCG+pPyUyozE4oz4otKc1OJDjDIcHEoSvF77gXKCR anpqRVpmTnASIJJS3DwKInwCoOkeYsLEnOLM9MhUqcYFaXEeReCJARAEhmleXBtsOi9xCgrJc zLCHSIEE9BalFuZgmq/CtGcQ5GJWHesyBTeDLzSuCmvwJazAS0WNsVbHFJIkJKqoGxekOUIPO tZz/vOV2+8a3mhLvL7BgP3f3nfhZ8Y3ubuXLJ8QD+hjyLxJzDF10uKD+pYT4olvXIYd7EWTG/ 2S/6bZ2SGLdW3VKiMFOjaMn5J063zHcuX3JV4dbRV+v8Pi+e9kdklZn/x+zp3c/WFZ52XFxw8 PaV6QKdn//JHKpLv+F11eaGu+7lMiWW4oxEQy3mouJEAAUyA5XZAgAA X-Env-Sender: boris.ostrovsky@oracle.com X-Msg-Ref: server-4.tower-21.messagelabs.com!1488830695!54768155!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.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26333 invoked from network); 6 Mar 2017 20:04:57 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-4.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 6 Mar 2017 20:04:57 -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 v26K4Zep016695 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Mar 2017 20:04:36 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 v26K4Y3U015345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 6 Mar 2017 20:04:35 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v26K4Vr2024360; Mon, 6 Mar 2017 20:04:32 GMT Received: from dhcp-burlington7-2nd-B-east-10-152-55-162.usdhcp.oraclecorp.com (/10.152.52.138) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 06 Mar 2017 12:04:31 -0800 To: "Kirill A. Shutemov" , Linus Torvalds , Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , Arnd Bergmann , "H. Peter Anvin" References: <20170306135357.3124-1-kirill.shutemov@linux.intel.com> <20170306135357.3124-29-kirill.shutemov@linux.intel.com> From: Boris Ostrovsky Message-ID: <7e78a76a-f5e8-bb60-e5be-a91a84faa1f9@oracle.com> Date: Mon, 6 Mar 2017 15:05:49 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170306135357.3124-29-kirill.shutemov@linux.intel.com> X-Source-IP: userv0022.oracle.com [156.151.31.74] Cc: linux-arch@vger.kernel.org, Juergen Gross , Andi Kleen , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Dave Hansen , xen-devel Subject: Re: [Xen-devel] [PATCHv4 28/33] x86/mm: add support of additional page table level during early boot 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: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP > diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h > index 9991224f6238..c9e41f1599dd 100644 > --- a/arch/x86/include/asm/pgtable_64.h > +++ b/arch/x86/include/asm/pgtable_64.h > @@ -14,15 +14,17 @@ > #include > #include > > +extern p4d_t level4_kernel_pgt[512]; > +extern p4d_t level4_ident_pgt[512]; > extern pud_t level3_kernel_pgt[512]; > extern pud_t level3_ident_pgt[512]; > extern pmd_t level2_kernel_pgt[512]; > extern pmd_t level2_fixmap_pgt[512]; > extern pmd_t level2_ident_pgt[512]; > extern pte_t level1_fixmap_pgt[512]; > -extern pgd_t init_level4_pgt[]; > +extern pgd_t init_top_pgt[]; > > -#define swapper_pg_dir init_level4_pgt > +#define swapper_pg_dir init_top_pgt > > extern void paging_init(void); > This means you also need -boris diff --git a/arch/x86/xen/xen-pvh.S b/arch/x86/xen/xen-pvh.S index 5e24671..e1a5fbe 100644 --- a/arch/x86/xen/xen-pvh.S +++ b/arch/x86/xen/xen-pvh.S @@ -87,7 +87,7 @@ ENTRY(pvh_start_xen) wrmsr /* Enable pre-constructed page tables. */ - mov $_pa(init_level4_pgt), %eax + mov $_pa(init_top_pgt), %eax mov %eax, %cr3 mov $(X86_CR0_PG | X86_CR0_PE), %eax mov %eax, %cr0