diff options
-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 c12a75953b5b..fb5d6c2e6a08 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -48,6 +48,9 @@ MODULE_LICENSE("GPL"); | |||
48 | #define SVM_DEATURE_SVML (1 << 2) | 48 | #define SVM_DEATURE_SVML (1 << 2) |
49 | 49 | ||
50 | static bool npt_enabled = false; | 50 | static bool npt_enabled = false; |
51 | static int npt = 1; | ||
52 | |||
53 | module_param(npt, int, S_IRUGO); | ||
51 | 54 | ||
52 | static void kvm_reput_irq(struct vcpu_svm *svm); | 55 | static void kvm_reput_irq(struct vcpu_svm *svm); |
53 | 56 | ||
@@ -418,6 +421,11 @@ static __init int svm_hardware_setup(void) | |||
418 | if (!svm_has(SVM_FEATURE_NPT)) | 421 | if (!svm_has(SVM_FEATURE_NPT)) |
419 | npt_enabled = false; | 422 | npt_enabled = false; |
420 | 423 | ||
424 | if (npt_enabled && !npt) { | ||
425 | printk(KERN_INFO "kvm: Nested Paging disabled\n"); | ||
426 | npt_enabled = false; | ||
427 | } | ||
428 | |||
421 | if (npt_enabled) | 429 | if (npt_enabled) |
422 | printk(KERN_INFO "kvm: Nested Paging enabled\n"); | 430 | printk(KERN_INFO "kvm: Nested Paging enabled\n"); |
423 | 431 | ||