Re: [2.6.30-rc8 KVM] gcc 3.3 dies at emulate_2op_cl().

From: Avi Kivity
Date: Sun Jun 07 2009 - 04:30:18 EST


Tetsuo Handa wrote:
Avi Kivity wrote:
I think something is wrong with emulate_2op_cl() when compiled with gcc 3.3.5 .
This is on i386, not x86_64, yes?

Yes. Building "make allmodconfig" using Debian Sarge on i686 machine.

Does the attached patch help?

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index 22c765d..01717a5 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -451,7 +451,7 @@ static u32 group2_table[] = {
_PRE_EFLAGS("0", "5", "2") \
_op _suffix " %4,%1 \n" \
_POST_EFLAGS("0", "5", "2") \
- : "=m" (_eflags), "+r" (_dstv), "=&r" (_tmp) \
+ : "=m" (_eflags), "+rm" (_dstv), "=&r" (_tmp) \
: "c" (_clv) , "r" (_srcv), "i" (EFLAGS_MASK) \
); \
\