Commit b36d24b6c3708413f1174e34bd86b4bf5116012f
1 parent
ecabe8cc
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/trunk@6689 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
4 deletions
target-i386/helper.c
... | ... | @@ -1421,10 +1421,10 @@ static void host_cpuid(uint32_t function, uint32_t count, |
1421 | 1421 | #else |
1422 | 1422 | asm volatile("pusha \n\t" |
1423 | 1423 | "cpuid \n\t" |
1424 | - "mov %%eax, 0(%1) \n\t" | |
1425 | - "mov %%ebx, 4(%1) \n\t" | |
1426 | - "mov %%ecx, 8(%1) \n\t" | |
1427 | - "mov %%edx, 12(%1) \n\t" | |
1424 | + "mov %%eax, 0(%2) \n\t" | |
1425 | + "mov %%ebx, 4(%2) \n\t" | |
1426 | + "mov %%ecx, 8(%2) \n\t" | |
1427 | + "mov %%edx, 12(%2) \n\t" | |
1428 | 1428 | "popa" |
1429 | 1429 | : : "a"(function), "c"(count), "S"(vec) |
1430 | 1430 | : "memory", "cc"); | ... | ... |