Re: [Xen-devel] [v3 04/12] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions

2018-10-25 Thread Andy Lutomirski
On Wed, Oct 24, 2018 at 12:16 PM Andy Lutomirski wrote: > > On Tue, Oct 23, 2018 at 11:43 AM Chang S. Bae > wrote: > > +/* > > + * Interrupts are disabled here. Out of line to be protected from kprobes. > > + */ > > +static noinline __kprobes unsigned long rd_inactive_gsbase(void) > > +{ > > +

Re: [Xen-devel] [v3 04/12] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions

2018-10-25 Thread Andrew Cooper
On 26/10/2018 00:11, Andy Lutomirski wrote: > On Thu, Oct 25, 2018 at 4:09 PM Andrew Cooper > wrote: >> On 25/10/2018 07:09, Juergen Gross wrote: >>> On 24/10/2018 21:41, Andrew Cooper wrote: On 24/10/18 20:16, Andy Lutomirski wrote: > On Tue, Oct 23, 2018 at 11:43 AM Chang S. Bae

Re: [Xen-devel] [v3 04/12] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions

2018-10-25 Thread Andy Lutomirski
On Thu, Oct 25, 2018 at 4:09 PM Andrew Cooper wrote: > > On 25/10/2018 07:09, Juergen Gross wrote: > > On 24/10/2018 21:41, Andrew Cooper wrote: > >> On 24/10/18 20:16, Andy Lutomirski wrote: > >>> On Tue, Oct 23, 2018 at 11:43 AM Chang S. Bae > >>> wrote: > The helper functions will switch

Re: [Xen-devel] [v3 04/12] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions

2018-10-25 Thread Andrew Cooper
On 25/10/2018 07:09, Juergen Gross wrote: > On 24/10/2018 21:41, Andrew Cooper wrote: >> On 24/10/18 20:16, Andy Lutomirski wrote: >>> On Tue, Oct 23, 2018 at 11:43 AM Chang S. Bae >>> wrote: The helper functions will switch on faster accesses to FSBASE and GSBASE when the FSGSBASE feat

Re: [Xen-devel] [v3 04/12] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions

2018-10-25 Thread Bae, Chang Seok
> On Oct 25, 2018, at 16:00, Andy Lutomirski wrote: > > On Thu, Oct 25, 2018 at 12:32 AM Bae, Chang Seok > wrote: >> >> >>> On Oct 24, 2018, at 12:16, Andy Lutomirski wrote: >>> >>> On Tue, Oct 23, 2018 at 11:43 AM Chang S. Bae >>> wrote: void x86_fsbase_write_cpu(unsigned long fsba

Re: [Xen-devel] [v3 04/12] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions

2018-10-25 Thread Andy Lutomirski
On Thu, Oct 25, 2018 at 12:32 AM Bae, Chang Seok wrote: > > > > On Oct 24, 2018, at 12:16, Andy Lutomirski wrote: > > > > On Tue, Oct 23, 2018 at 11:43 AM Chang S. Bae > > wrote: > >> void x86_fsbase_write_cpu(unsigned long fsbase) > >> { > >> - /* > >> -* Set the selector to 0 as

Re: [Xen-devel] [v3 04/12] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions

2018-10-25 Thread Bae, Chang Seok
> On Oct 24, 2018, at 12:16, Andy Lutomirski wrote: > > On Tue, Oct 23, 2018 at 11:43 AM Chang S. Bae > wrote: >> void x86_fsbase_write_cpu(unsigned long fsbase) >> { >> - /* >> -* Set the selector to 0 as a notion, that the segment base is >> -* overwritten, which will b

Re: [Xen-devel] [v3 04/12] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions

2018-10-24 Thread Juergen Gross
On 24/10/2018 21:41, Andrew Cooper wrote: > On 24/10/18 20:16, Andy Lutomirski wrote: >> On Tue, Oct 23, 2018 at 11:43 AM Chang S. Bae >> wrote: >>> The helper functions will switch on faster accesses to FSBASE and GSBASE >>> when the FSGSBASE feature is enabled. >>> >>> Accessing user GSBASE nee

Re: [Xen-devel] [v3 04/12] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions

2018-10-24 Thread Andrew Cooper
On 24/10/18 20:16, Andy Lutomirski wrote: > On Tue, Oct 23, 2018 at 11:43 AM Chang S. Bae > wrote: >> The helper functions will switch on faster accesses to FSBASE and GSBASE >> when the FSGSBASE feature is enabled. >> >> Accessing user GSBASE needs a couple of SWAPGS operations. It is avoidable

Re: [Xen-devel] [v3 04/12] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions

2018-10-24 Thread Andy Lutomirski
On Tue, Oct 23, 2018 at 11:43 AM Chang S. Bae wrote: > > The helper functions will switch on faster accesses to FSBASE and GSBASE > when the FSGSBASE feature is enabled. > > Accessing user GSBASE needs a couple of SWAPGS operations. It is avoidable > if the user GSBASE is saved at kernel entry, be