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

Borislav Petkov
2020-04-22T21:47:59Z

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.