Revision a36b1029 target-i386/kvm.c
b/target-i386/kvm.c | ||
---|---|---|
51 | 51 |
struct kvm_cpuid_entry2 *c = &cpuid_data.entries[cpuid_i++]; |
52 | 52 |
|
53 | 53 |
switch (i) { |
54 |
case 2: { |
|
55 |
/* Keep reading function 2 till all the input is received */ |
|
56 |
int times; |
|
57 |
|
|
58 |
cpu_x86_cpuid(env, i, 0, &eax, &ebx, &ecx, &edx); |
|
59 |
times = eax & 0xff; |
|
60 |
|
|
61 |
c->function = i; |
|
62 |
c->flags |= KVM_CPUID_FLAG_STATEFUL_FUNC; |
|
63 |
c->flags |= KVM_CPUID_FLAG_STATE_READ_NEXT; |
|
64 |
c->eax = eax; |
|
65 |
c->ebx = ebx; |
|
66 |
c->ecx = ecx; |
|
67 |
c->edx = edx; |
|
68 |
|
|
69 |
for (j = 1; j < times; ++j) { |
|
70 |
cpu_x86_cpuid(env, i, 0, &eax, &ebx, &ecx, &edx); |
|
71 |
c->function = i; |
|
72 |
c->flags |= KVM_CPUID_FLAG_STATEFUL_FUNC; |
|
73 |
c->eax = eax; |
|
74 |
c->ebx = ebx; |
|
75 |
c->ecx = ecx; |
|
76 |
c->edx = edx; |
|
77 |
} |
|
78 |
break; |
|
79 |
} |
|
54 | 80 |
case 4: |
55 | 81 |
case 0xb: |
56 | 82 |
case 0xd: |
Also available in: Unified diff