aboutsummaryrefslogtreecommitdiff
path: root/target-i386/helper.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-05 19:01:53 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-05 19:01:53 +0000
commit8ae0978ed54cdc1d55130af4dc32b362cd75706c (patch)
treec7e8646af5221fbeab64d417e9369336686dd02b /target-i386/helper.c
parentc0024a82577d14564b300dad440437d352ae6a26 (diff)
Fix cpuid KVM crash on i386 (Lubomir Rintel)
Cpuid should return into vec, not overwrite past address in count. Changeset 6565 broke this. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10_0@6691 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r--target-i386/helper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index c0fc556c70..82137039d1 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -1421,10 +1421,10 @@ static void host_cpuid(uint32_t function, uint32_t count,
#else
asm volatile("pusha \n\t"
"cpuid \n\t"
- "mov %%eax, 0(%1) \n\t"
- "mov %%ebx, 4(%1) \n\t"
- "mov %%ecx, 8(%1) \n\t"
- "mov %%edx, 12(%1) \n\t"
+ "mov %%eax, 0(%2) \n\t"
+ "mov %%ebx, 4(%2) \n\t"
+ "mov %%ecx, 8(%2) \n\t"
+ "mov %%edx, 12(%2) \n\t"
"popa"
: : "a"(function), "c"(count), "S"(vec)
: "memory", "cc");