lkml.org 
[lkml]   [2015]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 RESEND 4/11] x86/asm: Fix pud/pmd interfaces to handle large PAT bit
On Mon, Nov 09, 2015 at 12:16:41PM -0700, Toshi Kani wrote:
> On Mon, 2015-11-09 at 13:06 -0500, Boris Ostrovsky wrote:
> > On 09/17/2015 02:24 PM, Toshi Kani wrote:
> > > Now that we have pud/pmd mask interfaces, which handle pfn & flags
> > > mask properly for the large PAT bit.
> > >
> > > Fix pud/pmd pfn & flags interfaces by replacing PTE_PFN_MASK and
> > > PTE_FLAGS_MASK with the pud/pmd mask interfaces.
> > >
> > > Suggested-by: Juergen Gross <jgross@suse.com>
> > > Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
> > > Cc: Juergen Gross <jgross@suse.com>
> > > Cc: Konrad Wilk <konrad.wilk@oracle.com>
> > > Cc: Thomas Gleixner <tglx@linutronix.de>
> > > Cc: H. Peter Anvin <hpa@zytor.com>
> > > Cc: Ingo Molnar <mingo@redhat.com>
> > > Cc: Borislav Petkov <bp@alien8.de>
> > > ---
> > > arch/x86/include/asm/pgtable.h | 14 ++++++++------
> > > arch/x86/include/asm/pgtable_types.h | 4 ++--
> > > 2 files changed, 10 insertions(+), 8 deletions(-)
> > >
> >
> >
> > Looks like this commit is causing this splat for 32-bit kernels. I am
> > attaching my config file, just in case.
>
> Thanks for the report! I'd like to reproduce the issue since I am not sure how
> this change caused it...
>
> I tried to build a kernel with the attached config file, and got the following
> error. Not sure what I am missing.

The problem is that PMD_PAGE_MASK as well as PUD_PAGE_MASK are 'unsigned
long', not 'unsigned long long'. So on 32-bit with PAE enabled your
pmd_pfn_mask()/pud_pfn_mask() will truncate bits 32..43 of pmd/pudval and
you'll never get proper page frame for pages above 4G.

--
Kirill A. Shutemov


\
 
 \ /
  Last update: 2015-11-09 21:41    [W:0.065 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site