aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kvm_emulate.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-06-07 07:10:16 -0400
committerAvi Kivity <avi@redhat.com>2012-07-09 07:19:00 -0400
commit0017f93a2776597b798ec1a9594e41dfd96d3c11 (patch)
treeef0a1e1a409f6d9a5d48894b0256a723c1b1183b /arch/x86/include/asm/kvm_emulate.h
parent62046e5a867cbff35e0beff42718dda41ff5d74b (diff)
KVM: x86 emulator: change ->get_cpuid() accessor to use the x86 semantics
Instead of getting an exact leaf, follow the spec and fall back to the last main leaf instead. This lets us easily emulate the cpuid instruction in the emulator. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_emulate.h')
-rw-r--r--arch/x86/include/asm/kvm_emulate.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
index 1ac46c22dd50..cd5c96b2496e 100644
--- a/arch/x86/include/asm/kvm_emulate.h
+++ b/arch/x86/include/asm/kvm_emulate.h
@@ -192,8 +192,8 @@ struct x86_emulate_ops {
192 struct x86_instruction_info *info, 192 struct x86_instruction_info *info,
193 enum x86_intercept_stage stage); 193 enum x86_intercept_stage stage);
194 194
195 bool (*get_cpuid)(struct x86_emulate_ctxt *ctxt, 195 void (*get_cpuid)(struct x86_emulate_ctxt *ctxt,
196 u32 *eax, u32 *ebx, u32 *ecx, u32 *edx); 196 u32 *eax, u32 *ebx, u32 *ecx, u32 *edx);
197}; 197};
198 198
199typedef u32 __attribute__((vector_size(16))) sse128_t; 199typedef u32 __attribute__((vector_size(16))) sse128_t;