lkml.org 
[lkml]   [2017]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/23] x86, kaiser: disable global pages
On Tue, 31 Oct 2017, Dave Hansen wrote:
> --- a/arch/x86/include/asm/pgtable_types.h~kaiser-prep-disable-global-pages 2017-10-31 15:03:49.314064402 -0700
> +++ b/arch/x86/include/asm/pgtable_types.h 2017-10-31 15:03:49.323064827 -0700
> @@ -47,7 +47,12 @@
> #define _PAGE_ACCESSED (_AT(pteval_t, 1) << _PAGE_BIT_ACCESSED)
> #define _PAGE_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_DIRTY)
> #define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE)
> +#ifdef CONFIG_X86_GLOBAL_PAGES
> #define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL)
> +#else
> +/* We must ensure that kernel TLBs are unusable while in userspace */
> +#define _PAGE_GLOBAL (_AT(pteval_t, 0))
> +#endif

What you really want to do here is to clear PAGE_GLOBAL in the
supported_pte_mask. probe_page_size_mask() is the proper place for that.

This allows both .config and boottime configuration.

Thanks,

tglx






\
 
 \ /
  Last update: 2017-11-01 22:19    [W:0.567 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site