Re: AMD boot woe due to "x86/mm: Cleanup pgprot_4k_2_large() and pgprot_large_2_4k()"

From: Borislav Petkov
Date: Wed Apr 22 2020 - 17:47:59 EST


On Wed, Apr 22, 2020 at 05:32:00PM -0400, Qian Cai wrote:
> This fixed the sucker,
>
> diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
> index edf9cea4871f..c54d1d0a8e3b 100644
> --- a/arch/x86/mm/pgtable.c
> +++ b/arch/x86/mm/pgtable.c
> @@ -708,7 +708,7 @@ int pud_set_huge(pud_t *pud, phys_addr_t addr, pgprot_t prot)
>
> set_pte((pte_t *)pud, pfn_pte(
> (u64)addr >> PAGE_SHIFT,
> - __pgprot(protval_4k_2_large(pgprot_val(prot) | _PAGE_PSE))));
> + __pgprot(protval_4k_2_large(pgprot_val(prot)) | _PAGE_PSE)));
>

Very good catch - that's one nasty wrongly placed closing bracket!
pmd_set_huge() has it correct.

Mind sending a proper patch?

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette