Re: [PATCH] x86/efi: Always map boot service regions into new EFI page tables

From: Scott Ashcroft
Date: Sun Mar 13 2016 - 21:09:26 EST


On Sun, 2016-03-13 at 23:07 +0000, Matt Fleming wrote:
> Assuming the answer to this question is "no", can you try out this
> patch?
>
> 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)));
>

Yes, that does fix it.

Cheers,
Scott