[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YXki1Zx4jCmikBuf@zn.tnic>
Date: Wed, 27 Oct 2021 11:58:45 +0200
From: Borislav Petkov <bp@...en8.de>
To: Joerg Roedel <joro@...tes.org>
Cc: x86@...nel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, hpa@...or.com,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Joerg Roedel <jroedel@...e.de>,
Mike Rapoport <rppt@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Brijesh Singh <brijesh.singh@....com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/4] x86/mm: Flush global TLB when switching to
trampoline page-table
On Fri, Oct 01, 2021 at 05:48:16PM +0200, Joerg Roedel wrote:
> diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c
> index 31b5856010cb..b9802b18f504 100644
> --- a/arch/x86/realmode/init.c
> +++ b/arch/x86/realmode/init.c
> @@ -17,6 +17,29 @@ u32 *trampoline_cr4_features;
> /* Hold the pgd entry used on booting additional CPUs */
> pgd_t trampoline_pgd_entry;
>
> +void load_trampoline_pgtable(void)
> +{
> +#ifdef CONFIG_X86_32
> + load_cr3(initial_page_table);
> +#else
> + /* Exiting long mode will fail if CR4.PCIDE is set. */
So this comment is not valid anymore if this is a separate function - it
is valid only when that function is called in reboot.c so I guess you
should leave that comment there.
> + if (boot_cpu_has(X86_FEATURE_PCID))
> + cr4_clear_bits(X86_CR4_PCIDE);
> +
> + write_cr3(real_mode_header->trampoline_pgd);
Is there any significance to the reordering of those calls here? The
commit message doesn't say...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists