From: Herbert Xu Date: Tue, 23 Jan 2007 03:10:00 +0000 (+1100) Subject: [PATCH] vmx: Fix register constraint in launch code X-Git-Tag: v2.6.20-rc6~48 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e00154891137e3b0659556b877d45a16cabd700c;p=linux-2.6 [PATCH] vmx: Fix register constraint in launch code Both "=r" and "=g" breaks my build on i386: $ make CC [M] drivers/kvm/vmx.o {standard input}: Assembler messages: {standard input}:3318: Error: bad register name `%sil' make[1]: *** [drivers/kvm/vmx.o] Error 1 make: *** [_module_drivers/kvm] Error 2 The reason is that setbe requires an 8-bit register but "=r" does not constrain the target register to be one that has an 8-bit version on i386. According to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10153 the correct constraint is "=q". Signed-off-by: Herbert Xu Signed-off-by: Linus Torvalds --- diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index ce219e3f55..0aa2659f6a 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -1824,7 +1824,7 @@ again: #endif "setbe %0 \n\t" "popf \n\t" - : "=g" (fail) + : "=q" (fail) : "r"(vcpu->launched), "d"((unsigned long)HOST_RSP), "c"(vcpu), [rax]"i"(offsetof(struct kvm_vcpu, regs[VCPU_REGS_RAX])),