aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index f5b49c7fc89d..a644acb6ed80 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -49,9 +49,6 @@
49MODULE_AUTHOR("Qumranet"); 49MODULE_AUTHOR("Qumranet");
50MODULE_LICENSE("GPL"); 50MODULE_LICENSE("GPL");
51 51
52static int __read_mostly bypass_guest_pf = 1;
53module_param(bypass_guest_pf, bool, S_IRUGO);
54
55static int __read_mostly enable_vpid = 1; 52static int __read_mostly enable_vpid = 1;
56module_param_named(vpid, enable_vpid, bool, 0444); 53module_param_named(vpid, enable_vpid, bool, 0444);
57 54
@@ -3632,8 +3629,8 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
3632 vmcs_write32(PLE_WINDOW, ple_window); 3629 vmcs_write32(PLE_WINDOW, ple_window);
3633 } 3630 }
3634 3631
3635 vmcs_write32(PAGE_FAULT_ERROR_CODE_MASK, !!bypass_guest_pf); 3632 vmcs_write32(PAGE_FAULT_ERROR_CODE_MASK, 0);
3636 vmcs_write32(PAGE_FAULT_ERROR_CODE_MATCH, !!bypass_guest_pf); 3633 vmcs_write32(PAGE_FAULT_ERROR_CODE_MATCH, 0);
3637 vmcs_write32(CR3_TARGET_COUNT, 0); /* 22.2.1 */ 3634 vmcs_write32(CR3_TARGET_COUNT, 0); /* 22.2.1 */
3638 3635
3639 vmcs_write16(HOST_FS_SELECTOR, 0); /* 22.2.4 */ 3636 vmcs_write16(HOST_FS_SELECTOR, 0); /* 22.2.4 */
@@ -7103,16 +7100,12 @@ static int __init vmx_init(void)
7103 vmx_disable_intercept_for_msr(MSR_IA32_SYSENTER_EIP, false); 7100 vmx_disable_intercept_for_msr(MSR_IA32_SYSENTER_EIP, false);
7104 7101
7105 if (enable_ept) { 7102 if (enable_ept) {
7106 bypass_guest_pf = 0;
7107 kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull, 7103 kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull,
7108 VMX_EPT_EXECUTABLE_MASK); 7104 VMX_EPT_EXECUTABLE_MASK);
7109 kvm_enable_tdp(); 7105 kvm_enable_tdp();
7110 } else 7106 } else
7111 kvm_disable_tdp(); 7107 kvm_disable_tdp();
7112 7108
7113 if (bypass_guest_pf)
7114 kvm_mmu_set_nonpresent_ptes(~0xffeull, 0ull);
7115
7116 return 0; 7109 return 0;
7117 7110
7118out3: 7111out3: