From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] x86: use "R" constraint for fxsaveq/fxrstorq enforcement Date: Tue, 13 Aug 2013 18:34:20 +0100 Message-ID: References: <520A705E02000078000EB96B@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1V9IUE-0002g1-Dn for xen-devel@lists.xenproject.org; Tue, 13 Aug 2013 17:34:26 +0000 Received: by mail-ee0-f47.google.com with SMTP id d49so4339216eek.34 for ; Tue, 13 Aug 2013 10:34:24 -0700 (PDT) In-Reply-To: <520A705E02000078000EB96B@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org On 13/08/2013 16:43, "Jan Beulich" wrote: > I became aware of this constraint's (referring to all legacy registers > in one go) existence by (accidentally) noticing Linux commit 82024135 > ("x86-64, fpu: Simplify constraints for fxsave/fxtstor"). > > Signed-off-by: Jan Beulich Assuming it is available on all our supported versions of gcc: Acked-by: Keir Fraser > --- a/xen/arch/x86/i387.c > +++ b/xen/arch/x86/i387.c > @@ -96,8 +96,7 @@ static inline void fpu_fxrstor(struct vc > ".previous \n" > _ASM_EXTABLE(1b, 2b) > : > - : "m" (*fpu_ctxt), "i" (sizeof(*fpu_ctxt) / 4), > - "cdaSDb" (fpu_ctxt) ); > + : "m" (*fpu_ctxt), "i" (sizeof(*fpu_ctxt) / 4), "R" (fpu_ctxt) ); > break; > case 4: case 2: > asm volatile ( > @@ -162,7 +161,7 @@ static inline void fpu_fxsave(struct vcp > * addressing mode that doesn't require extended registers. > */ > asm volatile ( REX64_PREFIX "fxsave (%1)" > - : "=m" (*fpu_ctxt) : "cdaSDb" (fpu_ctxt) ); > + : "=m" (*fpu_ctxt) : "R" (fpu_ctxt) ); > > /* > * AMD CPUs don't save/restore FDP/FIP/FOP unless an exception > > >