From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] x86: use "R" constraint for fxsaveq/fxrstorq enforcement
Date: Tue, 13 Aug 2013 18:34:20 +0100 [thread overview]
Message-ID: <CE302CAC.5AC15%keir.xen@gmail.com> (raw)
In-Reply-To: <520A705E02000078000EB96B@nat28.tlf.novell.com>
On 13/08/2013 16:43, "Jan Beulich" <JBeulich@suse.com> 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 <jbeulich@suse.com>
Assuming it is available on all our supported versions of gcc:
Acked-by: Keir Fraser <keir@xen.org>
> --- 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
>
>
>
prev parent reply other threads:[~2013-08-13 17:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 15:43 [PATCH] x86: use "R" constraint for fxsaveq/fxrstorq enforcement Jan Beulich
2013-08-13 17:02 ` Andrew Cooper
2013-08-13 17:34 ` Keir Fraser [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CE302CAC.5AC15%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.