KVM: x86 emulator: change ->get_cpuid() accessor to use the x86 semantics
authorAvi Kivity <avi@redhat.com>
Thu, 7 Jun 2012 11:10:16 +0000 (14:10 +0300)
committerAvi Kivity <avi@redhat.com>
Mon, 9 Jul 2012 11:19:00 +0000 (14:19 +0300)
commit0017f93a2776597b798ec1a9594e41dfd96d3c11
treeef0a1e1a409f6d9a5d48894b0256a723c1b1183b
parent62046e5a867cbff35e0beff42718dda41ff5d74b
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>
arch/x86/include/asm/kvm_emulate.h
arch/x86/kvm/emulate.c
arch/x86/kvm/x86.c