x86/entry/compat: In SYSENTER, sink AC clearing below the existing FLAGS test
authorAndy Lutomirski <luto@kernel.org>
Thu, 10 Mar 2016 03:00:25 +0000 (19:00 -0800)
committerIngo Molnar <mingo@kernel.org>
Thu, 10 Mar 2016 08:48:12 +0000 (09:48 +0100)
commite786041153df6343169373177248abfab5c5ac1b
tree62c50ba7d779eb5bb466d82bae42adec29809fd3
parenta318beea224d255c38652f88a7ae0d30ac4c23c3
x86/entry/compat: In SYSENTER, sink AC clearing below the existing FLAGS test

CLAC is slow, and the SYSENTER code already has an unlikely path
that runs if unusual flags are set.  Drop the CLAC and instead rely
on the unlikely path to clear AC.

This seems to save ~24 cycles on my Skylake laptop.  (Hey, Intel,
make this faster please!)

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/90d6db2189f9add83bc7bddd75a0c19ebbd676b2.1457578375.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/entry/entry_64_compat.S