From: aliguori Date: Thu, 5 Mar 2009 19:01:28 +0000 (+0000) Subject: Fix cpuid KVM crash on i386 (Lubomir Rintel) X-Git-Tag: 0.10.0-0sb10~1891 X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=b36d24b6c3708413f1174e34bd86b4bf5116012f;p=qemu 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 Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6689 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/target-i386/helper.c b/target-i386/helper.c index c0fc556..8213703 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");