From: Doug Goldstein <cardoe@cardoe.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Cc: Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] x86: Fix build following c/s 623c720f "x86: use CLFLUSHOPT when available"
Date: Thu, 11 Feb 2016 16:14:22 -0600 [thread overview]
Message-ID: <56BD07BE.6040805@cardoe.com> (raw)
In-Reply-To: <1455218743-12751-1-git-send-email-andrew.cooper3@citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 2185 bytes --]
On 2/11/16 1:25 PM, Andrew Cooper wrote:
> CentOS 7 gets into trouble when compiling Xen citing:
>
> flushtlb.c: Assembler messages:
> flushtlb.c:149: Error: value of 256 too large for field of 1 bytes at 1
>
> The line number is wrong, and the error message not helpful. It turns out
> that the intermediate generated assembly was
>
> # 139 "arch/x86/flushtlb.c" 1
> 661:
> rex clflush (%r15)
> 662:
> .pushsection .altinstructions,"a"
>
> and it was having trouble combining the explicit REX prefix with the REX.B
> required for the use of %r15.
>
> Follow what Linux does and use a redundant %ds prefix instead, for a final
> generated instruction of `3e 41 0f ae 3f`
>
> While modifying this line, fix the indentation which was out by one space.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Doug Goldstein <cardoe@cardoe.com>
Confirmed to fix the build issue. Results:
https://travis-ci.org/cardoe/xen/builds/108653604
> ---
> CC: Jan Beulich <JBeulich@suse.com>
> ---
> xen/arch/x86/flushtlb.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/xen/arch/x86/flushtlb.c b/xen/arch/x86/flushtlb.c
> index 90a004f..727434e 100644
> --- a/xen/arch/x86/flushtlb.c
> +++ b/xen/arch/x86/flushtlb.c
> @@ -141,10 +141,10 @@ void flush_area_local(const void *va, unsigned int flags)
> {
> alternative(ASM_NOP3, "sfence", X86_FEATURE_CLFLUSHOPT);
> for ( i = 0; i < sz; i += c->x86_clflush_size )
> - alternative_input("rex clflush %0",
> - "data16 clflush %0",
> - X86_FEATURE_CLFLUSHOPT,
> - "m" (((const char *)va)[i]));
> + alternative_input(".byte 0x3e; clflush %0", /* %ds override. */
> + "data16 clflush %0", /* clflushopt. */
> + X86_FEATURE_CLFLUSHOPT,
> + "m" (((const char *)va)[i]));
> }
> else
> {
>
--
Doug Goldstein
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-02-11 22:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 19:25 [PATCH] x86: Fix build following c/s 623c720f "x86: use CLFLUSHOPT when available" Andrew Cooper
2016-02-11 19:41 ` Andrew Cooper
2016-02-12 8:13 ` Jan Beulich
2016-02-12 9:47 ` Andrew Cooper
2016-02-11 22:14 ` Doug Goldstein [this message]
2016-02-12 8:23 ` Jan Beulich
2016-02-12 9:51 ` Andrew Cooper
2016-02-12 10:00 ` Jan Beulich
2016-02-12 10:02 ` Andrew Cooper
2016-02-12 10:12 ` Jan Beulich
2016-02-12 10:50 ` Andrew Cooper
2016-02-12 10:57 ` Jan Beulich
2016-02-12 11:05 ` Andrew Cooper
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=56BD07BE.6040805@cardoe.com \
--to=cardoe@cardoe.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=xen-devel@lists.xen.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.