提交 b36d24b6 编写于 作者: A aliguori

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: NLubomir Rintel <lkundrak@v3.sk>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6689 c046a42c-6fe2-441c-8c8c-71466251a162
上级 ecabe8cc
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册