x86_64/entry/xen: Do not invoke espfix64 on Xen
authorAndy Lutomirski <luto@amacapital.net>
Wed, 23 Jul 2014 15:34:11 +0000 (08:34 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 13 Sep 2014 22:41:51 +0000 (23:41 +0100)
commit8ba19cd8c351e16b6be4caca9338d19b0cb8eaa4
tree2b2dc5b337bd94c65eee52abe0b8e3f4119bca9a
parent70d87cbbd92a3611655b39003176ee1033796bf7
x86_64/entry/xen: Do not invoke espfix64 on Xen

commit 7209a75d2009dbf7745e2fd354abf25c3deb3ca3 upstream.

This moves the espfix64 logic into native_iret.  To make this work,
it gets rid of the native patch for INTERRUPT_RETURN:
INTERRUPT_RETURN on native kernels is now 'jmp native_iret'.

This changes the 16-bit SS behavior on Xen from OOPSing to leaking
some bits of the Xen hypervisor's RSP (I think).

[ hpa: this is a nonzero cost on native, but probably not enough to
  measure. Xen needs to fix this in their own code, probably doing
  something equivalent to espfix64. ]

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Link: http://lkml.kernel.org/r/7b8f1d8ef6597cb16ae004a43c56980a7de3cf94.1406129132.git.luto@amacapital.net
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/include/asm/irqflags.h
arch/x86/kernel/entry_64.S
arch/x86/kernel/paravirt_patch_64.c