Re: [PATCH 2/9] x86: Add support for rd/wr fs/gs base

2016-04-14 Thread Andy Lutomirski
On Mon, Mar 21, 2016 at 9:16 AM, Andi Kleen wrote: > From: Andi Kleen > > Introduction: > > IvyBridge added four new instructions to directly write the fs and gs > 64bit base registers. Previously this had to be done with a system > call to write to MSRs. The main use case is fast user space thre

Re: [PATCH 2/9] x86: Add support for rd/wr fs/gs base

2016-03-22 Thread Brian Gerst
On Mon, Mar 21, 2016 at 6:15 PM, Andi Kleen wrote: > On Mon, Mar 21, 2016 at 03:08:46PM -0700, Andy Lutomirski wrote: >> On Mon, Mar 21, 2016 at 3:05 PM, Andi Kleen wrote: >> >> Please add a patch before this one that renames gs to gsbase. This is >> >> unreadable as is. >> > >> > I investigated

Re: [PATCH 2/9] x86: Add support for rd/wr fs/gs base

2016-03-22 Thread Thomas Gleixner
On Mon, 21 Mar 2016, Andi Kleen wrote: > On Mon, Mar 21, 2016 at 03:08:46PM -0700, Andy Lutomirski wrote: > > On Mon, Mar 21, 2016 at 3:05 PM, Andi Kleen wrote: > > >> Please add a patch before this one that renames gs to gsbase. This is > > >> unreadable as is. > > > > > > I investigated this no

Re: [PATCH 2/9] x86: Add support for rd/wr fs/gs base

2016-03-21 Thread Andi Kleen
On Mon, Mar 21, 2016 at 03:08:46PM -0700, Andy Lutomirski wrote: > On Mon, Mar 21, 2016 at 3:05 PM, Andi Kleen wrote: > >> Please add a patch before this one that renames gs to gsbase. This is > >> unreadable as is. > > > > I investigated this now, and it's not straight forward because on 32bit >

Re: [PATCH 2/9] x86: Add support for rd/wr fs/gs base

2016-03-21 Thread Andy Lutomirski
On Mon, Mar 21, 2016 at 3:05 PM, Andi Kleen wrote: >> Please add a patch before this one that renames gs to gsbase. This is >> unreadable as is. > > I investigated this now, and it's not straight forward because on 32bit > ->gs is actually gsindex, not gsbase. So with a straight rename you > woul

Re: [PATCH 2/9] x86: Add support for rd/wr fs/gs base

2016-03-21 Thread Andi Kleen
> Please add a patch before this one that renames gs to gsbase. This is > unreadable as is. I investigated this now, and it's not straight forward because on 32bit ->gs is actually gsindex, not gsbase. So with a straight rename you would end up with index in base on 32bit, which would be confusin

Re: [PATCH 2/9] x86: Add support for rd/wr fs/gs base

2016-03-21 Thread Andy Lutomirski
On Mon, Mar 21, 2016 at 12:05 PM, Andi Kleen wrote: > On Mon, Mar 21, 2016 at 11:13:05AM -0700, Andy Lutomirski wrote: >> On Mar 21, 2016 9:16 AM, "Andi Kleen" wrote: >> > >> > From: Andi Kleen >> > >> > Introduction: >> > >> > IvyBridge added four new instructions to directly write the fs and g

Re: [PATCH 2/9] x86: Add support for rd/wr fs/gs base

2016-03-21 Thread Andi Kleen
On Mon, Mar 21, 2016 at 11:13:05AM -0700, Andy Lutomirski wrote: > On Mar 21, 2016 9:16 AM, "Andi Kleen" wrote: > > > > From: Andi Kleen > > > > Introduction: > > > > IvyBridge added four new instructions to directly write the fs and gs > > 64bit base registers. Previously this had to be done wit

Re: [PATCH 2/9] x86: Add support for rd/wr fs/gs base

2016-03-21 Thread Andy Lutomirski
On Mar 21, 2016 9:16 AM, "Andi Kleen" wrote: > > From: Andi Kleen > > Introduction: > > IvyBridge added four new instructions to directly write the fs and gs > 64bit base registers. Previously this had to be done with a system > call to write to MSRs. The main use case is fast user space threadin