Re: [PATCH v3 3/4] x86/mm: Flush global TLB when switching to trampoline page-table

From: Borislav Petkov
Date: Thu Dec 02 2021 - 13:26:58 EST


On Thu, Dec 02, 2021 at 01:58:51PM +0100, Joerg Roedel wrote:
> Okay, but in the caller it is not visible the CR4.PCID is disabled in
> this function. I'd rather update the comment to tell that the function
> is called before transitioning to real mode?

Well, if something calls load_trampoline_pgtable(), it kinda assumes
that if it wants that that function will do all the necessary steps to
load it, including clearing PCIDE.

Why does the caller even need to know that that function clears
CR4.PCIDE?

--
Regards/Gruss,
Boris.

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