[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7B08037D-1682-406D-90F1-C2B5B1899F7F@vmware.com>
Date: Fri, 23 Mar 2018 19:12:50 +0000
From: Nadav Amit <namit@...are.com>
To: Dave Hansen <dave.hansen@...ux.intel.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"aarcange@...hat.com" <aarcange@...hat.com>,
"luto@...nel.org" <luto@...nel.org>,
"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
"keescook@...gle.com" <keescook@...gle.com>,
"hughd@...gle.com" <hughd@...gle.com>,
"jgross@...e.com" <jgross@...e.com>,
"x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH 09/11] x86/pti: enable global pages for shared areas
Dave Hansen <dave.hansen@...ux.intel.com> wrote:
>
> From: Dave Hansen <dave.hansen@...ux.intel.com>
>
> The entry/exit text and cpu_entry_area are mapped into userspace and
> the kernel. But, they are not _PAGE_GLOBAL. This creates unnecessary
> TLB misses.
>
> Add the _PAGE_GLOBAL flag for these areas.
>
> static void __init
> diff -puN arch/x86/mm/pti.c~kpti-why-no-global arch/x86/mm/pti.c
> --- a/arch/x86/mm/pti.c~kpti-why-no-global 2018-03-21 16:32:00.799192311 -0700
> +++ b/arch/x86/mm/pti.c 2018-03-21 16:32:00.803192311 -0700
> @@ -300,6 +300,13 @@ pti_clone_pmds(unsigned long start, unsi
> return;
>
> /*
> + * Setting 'target_pmd' below creates a mapping in both
> + * the user and kernel page tables. It is effectively
> + * global, so set it as global in both copies.
> + */
> + *pmd = pmd_set_flags(*pmd, _PAGE_GLOBAL);
if (boot_cpu_has(X86_FEATURE_PGE)) ?
Powered by blists - more mailing lists