Re: [PATCH RFC v2 5/6] x86: Use global pages when PTI is disabled

2018-02-15 Thread Nadav Amit
Dave Hansen wrote: > On 02/15/2018 11:53 AM, Andy Lutomirski wrote: >>> --- a/arch/x86/include/asm/tlbflush.h >>> +++ b/arch/x86/include/asm/tlbflush.h >>> @@ -319,6 +319,12 @@ static inline void set_cpu_pti_disable(unsigned short >>> disable) >>>WARN_ON_ONCE(preemptible()); >>> >>>

Re: [PATCH RFC v2 5/6] x86: Use global pages when PTI is disabled

2018-02-15 Thread Dave Hansen
On 02/15/2018 11:53 AM, Andy Lutomirski wrote: >> --- a/arch/x86/include/asm/tlbflush.h >> +++ b/arch/x86/include/asm/tlbflush.h >> @@ -319,6 +319,12 @@ static inline void set_cpu_pti_disable(unsigned short >> disable) >> WARN_ON_ONCE(preemptible()); >> >> pti_update_user_cs64(cpu_

Re: [PATCH RFC v2 5/6] x86: Use global pages when PTI is disabled

2018-02-15 Thread Andy Lutomirski
On Thu, Feb 15, 2018 at 4:36 PM, Nadav Amit wrote: > As long as PTI is disabled, it is possible to use global pages, as long > as we remove them once PTI is enabled again. To do so, return the global > bit to __supported_pte_mask and disable global pages using CR4. > > Signed-off-by: Nadav Amit >

Re: [PATCH RFC v2 5/6] x86: Use global pages when PTI is disabled

2018-02-15 Thread Dave Hansen
On 02/15/2018 09:47 AM, Nadav Amit wrote: > Dave Hansen wrote: >>> diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c >>> index c67ef3fb4f35..979c7ec6baab 100644 >>> --- a/arch/x86/mm/tlb.c >>> +++ b/arch/x86/mm/tlb.c >>> @@ -74,7 +74,8 @@ static void choose_new_asid(struct mm_struct *next, u64 >

Re: [PATCH RFC v2 5/6] x86: Use global pages when PTI is disabled

2018-02-15 Thread Nadav Amit
Dave Hansen wrote: >> diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c >> index c67ef3fb4f35..979c7ec6baab 100644 >> --- a/arch/x86/mm/tlb.c >> +++ b/arch/x86/mm/tlb.c >> @@ -74,7 +74,8 @@ static void choose_new_asid(struct mm_struct *next, u64 >> next_tlb_gen, >> return; >>

Re: [PATCH RFC v2 5/6] x86: Use global pages when PTI is disabled

2018-02-15 Thread Nadav Amit
Dave Hansen wrote: > On 02/15/2018 08:36 AM, Nadav Amit wrote: >> As long as PTI is disabled, it is possible to use global pages, as long >> as we remove them once PTI is enabled again. To do so, return the global >> bit to __supported_pte_mask and disable global pages using CR4. >> >> Signed-of

Re: [PATCH RFC v2 5/6] x86: Use global pages when PTI is disabled

2018-02-15 Thread Dave Hansen
On 02/15/2018 08:36 AM, Nadav Amit wrote: > As long as PTI is disabled, it is possible to use global pages, as long > as we remove them once PTI is enabled again. To do so, return the global > bit to __supported_pte_mask and disable global pages using CR4. > > Signed-off-by: Nadav Amit > --- > a