summaryrefslogtreecommitdiff
path: root/target-i386/kvm.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-09 15:50:08 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-09 15:50:08 +0000
commite00b6f80998a9974faf389b67adcc97db87f2bb3 (patch)
tree67eb1183fed2191124ddb3d4d229eb8c095b988d /target-i386/kvm.c
parent4f396364a695cef83f9c12618a6919736d3b048b (diff)
downloadqemu-e00b6f80998a9974faf389b67adcc97db87f2bb3.tar.gz
KVM: CPUID takes ecx as input value for some functions (Amit Shah)
The CPUID instruction takes the value of ECX as an input parameter in addition to the value of EAX as the count for functions 4, 0xb and 0xd. Make sure we pass the value to the instruction. Also convert to the qemu-style whitespace for the surrounding code. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6565 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/kvm.c')
-rw-r--r--target-i386/kvm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 0834e62853..123f7d29c8 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -44,13 +44,13 @@ int kvm_arch_init_vcpu(CPUState *env)
cpuid_i = 0;
- cpu_x86_cpuid(env, 0, &eax, &ebx, &ecx, &edx);
+ cpu_x86_cpuid(env, 0, 0, &eax, &ebx, &ecx, &edx);
limit = eax;
for (i = 0; i <= limit; i++) {
struct kvm_cpuid_entry *c = &cpuid_data.entries[cpuid_i++];
- cpu_x86_cpuid(env, i, &eax, &ebx, &ecx, &edx);
+ cpu_x86_cpuid(env, i, 0, &eax, &ebx, &ecx, &edx);
c->function = i;
c->eax = eax;
c->ebx = ebx;
@@ -58,13 +58,13 @@ int kvm_arch_init_vcpu(CPUState *env)
c->edx = edx;
}
- cpu_x86_cpuid(env, 0x80000000, &eax, &ebx, &ecx, &edx);
+ cpu_x86_cpuid(env, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
limit = eax;
for (i = 0x80000000; i <= limit; i++) {
struct kvm_cpuid_entry *c = &cpuid_data.entries[cpuid_i++];
- cpu_x86_cpuid(env, i, &eax, &ebx, &ecx, &edx);
+ cpu_x86_cpuid(env, i, 0, &eax, &ebx, &ecx, &edx);
c->function = i;
c->eax = eax;
c->ebx = ebx;