Re: [Xen-devel] [PATCH v2 4/6] xen/x86: disable global pages for domains with XPTI active

2018-03-09 Thread Juergen Gross
On 08/03/18 16:06, Jan Beulich wrote: On 02.03.18 at 09:14, wrote: >> @@ -123,22 +142,14 @@ unsigned int flush_area_local(const void *va, unsigned >> int flags) >> u32 t = pre_flush(); >> >> if ( !cpu_has_invpcid ) >> -{ >> -

Re: [Xen-devel] [PATCH v2 4/6] xen/x86: disable global pages for domains with XPTI active

2018-03-09 Thread Juergen Gross
On 09/03/18 09:34, Jan Beulich wrote: On 09.03.18 at 06:23, wrote: >>> From: Jan Beulich [mailto:jbeul...@suse.com] >>> Sent: Thursday, March 8, 2018 9:39 PM >>> --- a/xen/include/asm-x86/domain.h +++ b/xen/include/asm-x86/domain.h @@ -622,7 +622,8 @@

Re: [Xen-devel] [PATCH v2 4/6] xen/x86: disable global pages for domains with XPTI active

2018-03-09 Thread Jan Beulich
>>> On 09.03.18 at 06:23, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Thursday, March 8, 2018 9:39 PM >> >> > --- a/xen/include/asm-x86/domain.h >> > +++ b/xen/include/asm-x86/domain.h >> > @@ -622,7 +622,8 @@ unsigned long pv_guest_cr4_fixup(const

Re: [Xen-devel] [PATCH v2 4/6] xen/x86: disable global pages for domains with XPTI active

2018-03-08 Thread Tian, Kevin
> From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Thursday, March 8, 2018 9:39 PM > > > --- a/xen/include/asm-x86/domain.h > > +++ b/xen/include/asm-x86/domain.h > > @@ -622,7 +622,8 @@ unsigned long pv_guest_cr4_fixup(const struct > vcpu *, unsigned long guest_cr4); > >

Re: [Xen-devel] [PATCH v2 4/6] xen/x86: disable global pages for domains with XPTI active

2018-03-08 Thread Jan Beulich
>>> On 02.03.18 at 09:14, wrote: > @@ -123,22 +142,14 @@ unsigned int flush_area_local(const void *va, unsigned > int flags) > u32 t = pre_flush(); > > if ( !cpu_has_invpcid ) > -{ > -unsigned long cr4 = read_cr4(); > - > -

Re: [Xen-devel] [PATCH v2 4/6] xen/x86: disable global pages for domains with XPTI active

2018-03-08 Thread Juergen Gross
On 08/03/18 15:33, Jan Beulich wrote: On 08.03.18 at 15:05, wrote: >> On 08/03/18 14:38, Jan Beulich wrote: >> On 02.03.18 at 09:14, wrote: Instead of flushing the TLB from global pages when switching address spaces with XPTI being active just

Re: [Xen-devel] [PATCH v2 4/6] xen/x86: disable global pages for domains with XPTI active

2018-03-08 Thread Jan Beulich
>>> On 08.03.18 at 15:05, wrote: > On 08/03/18 14:38, Jan Beulich wrote: > On 02.03.18 at 09:14, wrote: >>> Instead of flushing the TLB from global pages when switching address >>> spaces with XPTI being active just disable global pages via %cr4 >>>

Re: [Xen-devel] [PATCH v2 4/6] xen/x86: disable global pages for domains with XPTI active

2018-03-08 Thread Juergen Gross
On 08/03/18 14:38, Jan Beulich wrote: On 02.03.18 at 09:14, wrote: >> Instead of flushing the TLB from global pages when switching address >> spaces with XPTI being active just disable global pages via %cr4 >> completely when a domain subject to XPTI is active. This avoids

Re: [Xen-devel] [PATCH v2 4/6] xen/x86: disable global pages for domains with XPTI active

2018-03-08 Thread Jan Beulich
>>> On 02.03.18 at 09:14, wrote: > Instead of flushing the TLB from global pages when switching address > spaces with XPTI being active just disable global pages via %cr4 > completely when a domain subject to XPTI is active. This avoids the > need for extra TLB flushes as loading

Re: [Xen-devel] [PATCH v2 4/6] xen/x86: disable global pages for domains with XPTI active

2018-03-02 Thread Juergen Gross
On 02/03/18 12:03, Wei Liu wrote: > On Fri, Mar 02, 2018 at 09:14:01AM +0100, Juergen Gross wrote: >> Instead of flushing the TLB from global pages when switching address >> spaces with XPTI being active just disable global pages via %cr4 >> completely when a domain subject to XPTI is active. This

Re: [Xen-devel] [PATCH v2 4/6] xen/x86: disable global pages for domains with XPTI active

2018-03-02 Thread Wei Liu
On Fri, Mar 02, 2018 at 09:14:01AM +0100, Juergen Gross wrote: > Instead of flushing the TLB from global pages when switching address > spaces with XPTI being active just disable global pages via %cr4 > completely when a domain subject to XPTI is active. This avoids the > need for extra TLB

[Xen-devel] [PATCH v2 4/6] xen/x86: disable global pages for domains with XPTI active

2018-03-02 Thread Juergen Gross
Instead of flushing the TLB from global pages when switching address spaces with XPTI being active just disable global pages via %cr4 completely when a domain subject to XPTI is active. This avoids the need for extra TLB flushes as loading %cr3 will remove all TLB entries. Signed-off-by: Juergen