diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/svm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index df5b41192661..0fbbde54ecae 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -69,6 +69,9 @@ static int npt = 1; | |||
69 | 69 | ||
70 | module_param(npt, int, S_IRUGO); | 70 | module_param(npt, int, S_IRUGO); |
71 | 71 | ||
72 | static int nested = 0; | ||
73 | module_param(nested, int, S_IRUGO); | ||
74 | |||
72 | static void kvm_reput_irq(struct vcpu_svm *svm); | 75 | static void kvm_reput_irq(struct vcpu_svm *svm); |
73 | static void svm_flush_tlb(struct kvm_vcpu *vcpu); | 76 | static void svm_flush_tlb(struct kvm_vcpu *vcpu); |
74 | 77 | ||
@@ -443,6 +446,11 @@ static __init int svm_hardware_setup(void) | |||
443 | if (boot_cpu_has(X86_FEATURE_NX)) | 446 | if (boot_cpu_has(X86_FEATURE_NX)) |
444 | kvm_enable_efer_bits(EFER_NX); | 447 | kvm_enable_efer_bits(EFER_NX); |
445 | 448 | ||
449 | if (nested) { | ||
450 | printk(KERN_INFO "kvm: Nested Virtualization enabled\n"); | ||
451 | kvm_enable_efer_bits(EFER_SVME); | ||
452 | } | ||
453 | |||
446 | for_each_online_cpu(cpu) { | 454 | for_each_online_cpu(cpu) { |
447 | r = svm_cpu_init(cpu); | 455 | r = svm_cpu_init(cpu); |
448 | if (r) | 456 | if (r) |