diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-01-22 22:10:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-22 22:27:02 -0500 |
commit | e00154891137e3b0659556b877d45a16cabd700c (patch) | |
tree | 431b72f6cbdcca102eb619f4a00f8b9d0849a843 /drivers/kvm/vmx.c | |
parent | 46fd906131bfae831b56a1e64dd94956626fc07c (diff) |
[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 <herbert@gondor.apana.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/kvm/vmx.c')
-rw-r--r-- | drivers/kvm/vmx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index ce219e3f557f..0aa2659f6ae5 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -1824,7 +1824,7 @@ again: | |||
1824 | #endif | 1824 | #endif |
1825 | "setbe %0 \n\t" | 1825 | "setbe %0 \n\t" |
1826 | "popf \n\t" | 1826 | "popf \n\t" |
1827 | : "=g" (fail) | 1827 | : "=q" (fail) |
1828 | : "r"(vcpu->launched), "d"((unsigned long)HOST_RSP), | 1828 | : "r"(vcpu->launched), "d"((unsigned long)HOST_RSP), |
1829 | "c"(vcpu), | 1829 | "c"(vcpu), |
1830 | [rax]"i"(offsetof(struct kvm_vcpu, regs[VCPU_REGS_RAX])), | 1830 | [rax]"i"(offsetof(struct kvm_vcpu, regs[VCPU_REGS_RAX])), |