summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/cpuid.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-06-07 14:07:48 +0300
committerAvi Kivity <avi@redhat.com>2012-07-09 14:19:00 +0300
commit62046e5a867cbff35e0beff42718dda41ff5d74b (patch)
tree310b84d9c0d3428d5fcb452bff02c0f00d6dab37 /arch/x86/kvm/cpuid.h
parentd881e6f6cffe3993245963143cab2528f918e071 (diff)
downloadlinux-62046e5a867cbff35e0beff42718dda41ff5d74b.tar.gz
linux-62046e5a867cbff35e0beff42718dda41ff5d74b.tar.bz2
linux-62046e5a867cbff35e0beff42718dda41ff5d74b.zip
KVM: Split cpuid register access from computation
Introduce kvm_cpuid() to perform the leaf limit check and calculate register values, and let kvm_emulate_cpuid() just handle reading and writing the registers from/to the vcpu. This allows us to reuse kvm_cpuid() in a context where directly reading and writing registers is not desired. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/cpuid.h')
-rw-r--r--arch/x86/kvm/cpuid.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h
index 26d1fb437eb5..f449edc35e24 100644
--- a/arch/x86/kvm/cpuid.h
+++ b/arch/x86/kvm/cpuid.h
@@ -17,6 +17,7 @@ int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu,
int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu,
struct kvm_cpuid2 *cpuid,
struct kvm_cpuid_entry2 __user *entries);
+void kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx, u32 *ecx, u32 *edx);
static inline bool guest_cpuid_has_xsave(struct kvm_vcpu *vcpu)