hypervisor/x86/xen: Unset X86_BUG_SYSRET_SS_ATTRS on Xen PV guests
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Mon, 4 May 2015 15:02:15 +0000 (11:02 -0400)
committerDavid Vrabel <david.vrabel@citrix.com>
Tue, 5 May 2015 17:27:43 +0000 (18:27 +0100)
commita71dbdaa8ca2933391b08e0ae5567083e3af0892
treeca33c267fb1d81c9f2207e29be17fc4f82235407
parent16e6bd5970c88a2ac018b84a5f1dd5c2ff1fdf2c
hypervisor/x86/xen: Unset X86_BUG_SYSRET_SS_ATTRS on Xen PV guests

Commit 61f01dd941ba ("x86_64, asm: Work around AMD SYSRET SS descriptor
attribute issue") makes AMD processors set SS to __KERNEL_DS in
__switch_to() to deal with cases when SS is NULL.

This breaks Xen PV guests who do not want to load SS with__KERNEL_DS.

Since the problem that the commit is trying to address would have to be
fixed in the hypervisor (if it in fact exists under Xen) there is no
reason to set X86_BUG_SYSRET_SS_ATTRS flag for PV VPCUs here.

This can be easily achieved by adding x86_hyper_xen_hvm.set_cpu_features
op which will clear this flag. (And since this structure is no longer
HVM-specific we should do some renaming).

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
arch/x86/include/asm/hypervisor.h
arch/x86/kernel/cpu/hypervisor.c
arch/x86/xen/enlighten.c