From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
Julien Grall <julien.grall@arm.com>
Subject: Re: [PATCH] x86emul: keep compiler from using {x, y, z}mm registers itself
Date: Mon, 16 Oct 2017 13:37:09 +0100 [thread overview]
Message-ID: <cec2488c-1e8f-bc9e-ddc6-e8f0d2a6fabc@citrix.com> (raw)
In-Reply-To: <59E4C2F80200007800186B29@prv-mh.provo.novell.com>
On 16/10/17 13:32, Jan Beulich wrote:
> Since the emulator acts on the live hardware registers, we need to
> prevent the compiler from using them e.g. for inlined memcpy() /
> memset() (as gcc7 does). We can't, however, set this from the command
> line, as otherwise the 64-bit build would face issues with functions
> returning floating point values and being declared in standard headers.
>
> As the pragma isn't available prior to gcc6, we need to invoke it
> conditionally. Luckily up to gcc6 we haven't seen generated code access
> SIMD registers beyond what our asm()s do.
>
> Reported-by: George Dunlap <george.dunlap@citrix.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> While this doesn't affect core functionality, I think it would still be
> nice for it to be allowed in for 4.10.
Agreed.
Has this been tested with Clang? It stands a good chance of being
compatible, but we may need an && !defined(__clang__) included.
~Andrew
>
> --- a/tools/tests/x86_emulator/x86-emulate.h
> +++ b/tools/tests/x86_emulator/x86-emulate.h
> @@ -4,6 +4,11 @@
> #include <stdint.h>
> #include <stdlib.h>
> #include <string.h>
> +
> +#if __GNUC__ >= 6
> +#pragma GCC target("no-sse")
> +#endif
> +
> #include <xen/xen.h>
>
> #include <asm/msr-index.h>
>
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-10-16 12:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 12:32 [PATCH] x86emul: keep compiler from using {x, y, z}mm registers itself Jan Beulich
2017-10-16 12:37 ` Andrew Cooper [this message]
2017-10-16 12:42 ` Jan Beulich
2017-11-06 11:59 ` Ping: " Jan Beulich
2017-11-06 15:04 ` George Dunlap
2017-11-13 16:22 ` Julien Grall
2017-11-21 13:26 ` Ping#2: " Jan Beulich
2017-11-21 13:29 ` Andrew Cooper
2017-11-22 16:09 ` Julien Grall
2017-10-16 15:05 ` George Dunlap
2017-10-16 15:44 ` Jan Beulich
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=cec2488c-1e8f-bc9e-ddc6-e8f0d2a6fabc@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=julien.grall@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).