[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170306202339.GC27719@node.shutemov.name>
Date: Mon, 6 Mar 2017 23:23:39 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>, x86@...nel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Arnd Bergmann <arnd@...db.de>,
"H. Peter Anvin" <hpa@...or.com>, Andi Kleen <ak@...ux.intel.com>,
Dave Hansen <dave.hansen@...el.com>,
Andy Lutomirski <luto@...capital.net>,
linux-arch@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, xen-devel <xen-devel@...ts.xen.org>,
Juergen Gross <jgross@...e.com>
Subject: Re: [PATCHv4 28/33] x86/mm: add support of additional page table
level during early boot
On Mon, Mar 06, 2017 at 03:05:49PM -0500, Boris Ostrovsky wrote:
>
> > 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 <linux/bitops.h>
> > #include <linux/threads.h>
> >
> > +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
>
>
> 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
>
>
Ah. Thanks. I've missed that.
The fix is folded.
--
Kirill A. Shutemov
Powered by blists - more mailing lists