x86emul: vendor specific SYSENTER/SYSEXIT behavior in long mode
authorJan Beulich <jbeulich@suse.com>
Thu, 26 Mar 2020 11:36:30 +0000 (12:36 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 26 Mar 2020 11:36:30 +0000 (12:36 +0100)
commit94d7992ba21c29d4ea1c6a94e83b8ab2040ad01b
treeb1bf3a916a912a61025c1e12bd30aa1ab8e06314
parenta965d9fab2719753f8699d6ce9062e842c315c30
x86emul: vendor specific SYSENTER/SYSEXIT behavior in long mode

Intel CPUs permit both insns there while AMD ones don't.

While at it also
- drop the ring 0 check from SYSENTER handling - neither Intel's nor
  AMD's insn pages have any indication of #GP(0) getting raised when
  executed from ring 0, and trying it out in practice also confirms
  the check shouldn't be there,
- move SYSENTER segment register writing until after the (in principle
  able to fail) MSR reads.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c