lkml.org 
[lkml]   [2016]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/efi: Always map boot service regions into new EFI page tables
On Mon, 14 Mar, at 11:30:19AM, Ingo Molnar wrote:
>
> * Matt Fleming <matt@codeblueprint.co.uk> wrote:
>
> > diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
> > index 8fee5b6f8f66..af74849e8c0f 100644
> > --- a/arch/x86/mm/pageattr.c
> > +++ b/arch/x86/mm/pageattr.c
> > @@ -1055,7 +1055,7 @@ static int populate_pud(struct cpa_data *cpa, unsigned long start, pgd_t *pgd,
> > /*
> > * Map everything starting from the Gb boundary, possibly with 1G pages
> > */
> > - while (end - start >= PUD_SIZE) {
> > + while (cpu_has_gbpages && end - start >= PUD_SIZE) {
> > set_pud(pud, __pud(cpa->pfn << PAGE_SHIFT | _PAGE_PSE |
> > massage_pgprot(pud_pgprot)));
>
> Btw., can 'cpa->pfn << PAGE_SHIFT' possibly work on 32-bit systems?
>
> cpa->pfn is unsigned long, so the result gets truncated to 32 bits ...
>
> cpa->pfn should be u64.

That is a nice catch.

Note that we never run this code on 32-bit right now. Moving 32-bit to
this code and away from the old_map scheme is on my TODO list.

\
 
 \ /
  Last update: 2016-03-14 13:21    [W:0.068 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site