On Thu, Apr 30, 2015 at 12:30 PM, Boris Ostrovsky
On 04/30/2015 03:17 PM, Andy Lutomirski wrote:http://article.gmane.org/gmane.linux.kernel/1937899
On Thu, Apr 30, 2015 at 12:08 PM, Boris Ostrovsky
Commit 61f01dd941ba ("x86_64, asm: Work around AMD SYSRET SS descriptorSeems reasonable.
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.
Have you run the test case on a Xen PV guest on AMD? It's possible
that Xen is affected, since the old accidental workaround that we
deleted was in the vdso and probably would have worked on Xen.
Is there a specific test that would trigger this bug? I
booted/suspended/resumed a bunch of various guest types on both AMD and
Intel but not much more than that. What is the commit that you deleted?
I doubt that a change in the guest could suddenly start triggering this
issue but I will take a look at hypervisor code.
The change was that we stopped reloading ss after 32-bit sysret in the
vdso trampoline. Before we always reloaded ss in userspace before
doing any stack operations.
I have no idea whether this was deliberate. It had done that (with
the attendant performance hit) since the very beginning, and there was
no comment explaining why.