aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorSheng Yang <sheng.yang@intel.com>2008-04-24 22:20:22 -0400
committerAvi Kivity <avi@qumranet.com>2008-05-04 07:44:34 -0400
commit67253af52e9133fb4cfbf7a2448a2d3524d1fa6c (patch)
tree5098624f90989a3844bb1b494658ea400d629b1f /arch/x86/kvm/vmx.c
parent8c6d6adc6b87daa364ee9deb2e966021d37a7622 (diff)
KVM: Add kvm_x86_ops get_tdp_level()
The function get_tdp_level() provided the number of tdp level for EPT and NPT rather than the NPT specific macro. Signed-off-by: Sheng Yang <sheng.yang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.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 d93250d11ca..98e4f2b036d 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2788,6 +2788,11 @@ static void __init vmx_check_processor_compat(void *rtn)
2788 } 2788 }
2789} 2789}
2790 2790
2791static int get_ept_level(void)
2792{
2793 return VMX_EPT_DEFAULT_GAW + 1;
2794}
2795
2791static struct kvm_x86_ops vmx_x86_ops = { 2796static struct kvm_x86_ops vmx_x86_ops = {
2792 .cpu_has_kvm_support = cpu_has_kvm_support, 2797 .cpu_has_kvm_support = cpu_has_kvm_support,
2793 .disabled_by_bios = vmx_disabled_by_bios, 2798 .disabled_by_bios = vmx_disabled_by_bios,
@@ -2844,6 +2849,7 @@ static struct kvm_x86_ops vmx_x86_ops = {
2844 .inject_pending_vectors = do_interrupt_requests, 2849 .inject_pending_vectors = do_interrupt_requests,
2845 2850
2846 .set_tss_addr = vmx_set_tss_addr, 2851 .set_tss_addr = vmx_set_tss_addr,
2852 .get_tdp_level = get_ept_level,
2847}; 2853};
2848 2854
2849static int __init vmx_init(void) 2855static int __init vmx_init(void)