Re: [PATCH v2] x86/vdso: Use RDPID in preference to LSL when available

2016-04-21 Thread Borislav Petkov
On Thu, Apr 21, 2016 at 08:25:45AM -0700, Andy Lutomirski wrote: > Didn't I? Bah, I cut off the line which has the "=a" and then did the commenting. Sorry about the noise. > I thought about it, and there were two reasons: > > 1. I don't think we want to use __getcpu in the kernel. LSL is fairly

Re: [PATCH v2] x86/vdso: Use RDPID in preference to LSL when available

2016-04-21 Thread Andy Lutomirski
On Thu, Apr 21, 2016 at 5:16 AM, Borislav Petkov wrote: > On Wed, Apr 20, 2016 at 06:16:01PM -0700, Andy Lutomirski wrote: >> Also, it's time for someone to do UMIP. I'll see if I can convince >> someone in KVM land to emulate it to make it easier to test. > > That'll be fun - we can simply set t

Re: [PATCH v2] x86/vdso: Use RDPID in preference to LSL when available

2016-04-21 Thread Borislav Petkov
On Wed, Apr 20, 2016 at 06:16:01PM -0700, Andy Lutomirski wrote: > Also, it's time for someone to do UMIP. I'll see if I can convince > someone in KVM land to emulate it to make it easier to test. That'll be fun - we can simply set that bit in CR4 and see who screams :-P > Changes from v1: > -

[PATCH v2] x86/vdso: Use RDPID in preference to LSL when available

2016-04-20 Thread Andy Lutomirski
RDPID is a new instruction that reads MSR_TSC_AUX quickly. This should be considerably faster than reading the GDT. Add a cpufeature for it and use it from __vdso_getcpu when available. Signed-off-by: Andy Lutomirski --- I don't have a Cannonlake CPU (or whatever CPU I'd need for this). Could