Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752914AbbD3WZ5 (ORCPT ); Thu, 30 Apr 2015 18:25:57 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:27281 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750839AbbD3WZz (ORCPT ); Thu, 30 Apr 2015 18:25:55 -0400 Message-ID: <5542AB60.1090907@oracle.com> Date: Thu, 30 Apr 2015 18:23:28 -0400 From: Boris Ostrovsky User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Andy Lutomirski CC: Konrad Rzeszutek Wilk , David Vrabel , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xenproject.org" , linux@eikelenboom.it Subject: Re: [PATCH] hypervisor/x86/xen: Unset X86_BUG_SYSRET_SS_ATTRS on Xen PV guests References: <1430420925-20474-1-git-send-email-boris.ostrovsky@oracle.com> <554282BC.5000103@oracle.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2131 Lines: 48 On 04/30/2015 03:35 PM, Andy Lutomirski wrote: > On Thu, Apr 30, 2015 at 12:30 PM, Boris Ostrovsky > wrote: >> On 04/30/2015 03:17 PM, Andy Lutomirski wrote: >>> On Thu, Apr 30, 2015 at 12:08 PM, Boris Ostrovsky >>> wrote: >>>> 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. >>>> >>> Seems reasonable. >>> >>> 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. > http://article.gmane.org/gmane.linux.kernel/1937899 > > 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. The test passed. Which I guess is not surprising given that interrupt handling is done by the hypervisor. -boris -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/