From: "tip-bot for H. Peter Anvin" <hpa@linux.intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
pbonzini@redhat.com, mtosatti@redhat.com, tglx@linutronix.de,
hpa@linux.intel.com, melanie.blower@intel.com
Subject: [tip:x86/urgent] x86, kvm: Remove incorrect redundant assembly constraint
Date: Mon, 26 Nov 2012 16:01:38 -0800 [thread overview]
Message-ID: <tip-cb7cb2864e758a1b040040bc55e404c677c911cb@git.kernel.org> (raw)
In-Reply-To: <B3584E72CFEBED439A3ECA9BCE67A4EF1B17AF90@FMSMSX107.amr.corp.intel.com>
Commit-ID: cb7cb2864e758a1b040040bc55e404c677c911cb
Gitweb: http://git.kernel.org/tip/cb7cb2864e758a1b040040bc55e404c677c911cb
Author: H. Peter Anvin <hpa@linux.intel.com>
AuthorDate: Wed, 21 Nov 2012 14:41:21 -0800
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Mon, 26 Nov 2012 15:52:48 -0800
x86, kvm: Remove incorrect redundant assembly constraint
In __emulate_1op_rax_rdx, we use "+a" and "+d" which are input/output
constraints, and *then* use "a" and "d" as input constraints. This is
incorrect, but happens to work on some versions of gcc.
However, it breaks gcc with -O0 and icc, and may break on future
versions of gcc.
Reported-and-tested-by: Melanie Blower <melanie.blower@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/B3584E72CFEBED439A3ECA9BCE67A4EF1B17AF90@FMSMSX107.amr.corp.intel.com
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
---
arch/x86/kvm/emulate.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 39171cb..bba39bf 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -426,8 +426,7 @@ static void invalidate_registers(struct x86_emulate_ctxt *ctxt)
_ASM_EXTABLE(1b, 3b) \
: "=m" ((ctxt)->eflags), "=&r" (_tmp), \
"+a" (*rax), "+d" (*rdx), "+qm"(_ex) \
- : "i" (EFLAGS_MASK), "m" ((ctxt)->src.val), \
- "a" (*rax), "d" (*rdx)); \
+ : "i" (EFLAGS_MASK), "m" ((ctxt)->src.val)); \
} while (0)
/* instruction has only one source operand, destination is implicit (e.g. mul, div, imul, idiv) */
prev parent reply other threads:[~2012-11-27 0:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 19:45 PROBLEM: compilation issue, inline assembly arch/x86/kvm/emulate.c fails at -O0 Blower, Melanie
2012-11-15 0:14 ` H. Peter Anvin
2012-11-15 15:09 ` Blower, Melanie
2012-11-15 15:09 ` Blower, Melanie
2012-11-21 21:35 ` H. Peter Anvin
2012-11-21 22:31 ` Blower, Melanie
2012-11-21 22:31 ` Blower, Melanie
2012-11-21 22:41 ` [PATCH] x86, kvm: Remove incorrect redundant assembly constraint H. Peter Anvin
2012-11-26 7:22 ` Paolo Bonzini
2012-11-26 22:48 ` H. Peter Anvin
2012-11-26 23:48 ` Marcelo Tosatti
2012-11-26 23:49 ` H. Peter Anvin
2012-11-27 0:53 ` Marcelo Tosatti
2012-11-27 0:01 ` tip-bot for H. Peter Anvin [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=tip-cb7cb2864e758a1b040040bc55e404c677c911cb@git.kernel.org \
--to=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=melanie.blower@intel.com \
--cc=mingo@kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
/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.