aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2008-02-07 07:47:40 -0500
committerAvi Kivity <avi@qumranet.com>2008-04-27 04:53:19 -0400
commit6c7dac72d5c7dc0e09512dce865398167be9a8f7 (patch)
tree2c10ebc4871ce0a688f139dbb4c6e81a45cc4286 /arch/x86/kvm/svm.c
parente3da3acdb32c1804a5c853feebcc037b7434076f (diff)
KVM: SVM: add module parameter to disable Nested Paging
To disable the use of the Nested Paging feature even if it is available in hardware this patch adds a module parameter. Nested Paging can be disabled by passing npt=0 to the kvm_amd module. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c8
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
50static bool npt_enabled = false; 50static bool npt_enabled = false;
51static int npt = 1;
52
53module_param(npt, int, S_IRUGO);
51 54
52static void kvm_reput_irq(struct vcpu_svm *svm); 55static 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