aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2009-12-18 03:48:46 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 10:35:40 -0500
commit0e85188049afacdfce9c026144142264981bbabb (patch)
tree773021a2bd3a799e2814e750ad85ff016f51fccf /arch/x86/kvm/vmx.c
parentbe43f83dada2cf0e9e01c9a0ba42977c5bd70f9d (diff)
KVM: Add cpuid_update() callback to kvm_x86_ops
Sometime, we need to adjust some state in order to reflect guest CPUID setting, e.g. if we don't expose rdtscp to guest, we won't want to enable it on hardware. cpuid_update() is introduced for this purpose. Also export kvm_find_cpuid_entry() for later use. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index f8f2fdc26894..75e8931e96c7 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3988,6 +3988,10 @@ static bool vmx_gb_page_enable(void)
3988 return false; 3988 return false;
3989} 3989}
3990 3990
3991static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
3992{
3993}
3994
3991static struct kvm_x86_ops vmx_x86_ops = { 3995static struct kvm_x86_ops vmx_x86_ops = {
3992 .cpu_has_kvm_support = cpu_has_kvm_support, 3996 .cpu_has_kvm_support = cpu_has_kvm_support,
3993 .disabled_by_bios = vmx_disabled_by_bios, 3997 .disabled_by_bios = vmx_disabled_by_bios,
@@ -4052,6 +4056,8 @@ static struct kvm_x86_ops vmx_x86_ops = {
4052 4056
4053 .exit_reasons_str = vmx_exit_reasons_str, 4057 .exit_reasons_str = vmx_exit_reasons_str,
4054 .gb_page_enable = vmx_gb_page_enable, 4058 .gb_page_enable = vmx_gb_page_enable,
4059
4060 .cpuid_update = vmx_cpuid_update,
4055}; 4061};
4056 4062
4057static int __init vmx_init(void) 4063static int __init vmx_init(void)