summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorPaolo Bonzini2017-08-11 18:36:43 +0200
committerPaolo Bonzini2017-10-12 14:01:55 +0200
commitd0006530576f1c7a49b2010eac7afdcb5a3613ae (patch)
tree58eb32edc47951d19b07bc854890beeba7bb3b36 /arch/x86/kvm/vmx.c
parentKVM: SVM: unconditionally wake up VCPU on IOMMU interrupt (diff)
downloadkernel-qcow2-linux-d0006530576f1c7a49b2010eac7afdcb5a3613ae.tar.gz
kernel-qcow2-linux-d0006530576f1c7a49b2010eac7afdcb5a3613ae.tar.xz
kernel-qcow2-linux-d0006530576f1c7a49b2010eac7afdcb5a3613ae.zip
KVM: SVM: limit kvm_handle_page_fault to #PF handling
It has always annoyed me a bit how SVM_EXIT_NPF is handled by pf_interception. This is also the only reason behind the under-documented need_unprotect argument to kvm_handle_page_fault. Let NPF go straight to kvm_mmu_page_fault, just like VMX does in handle_ept_violation and handle_ept_misconfig. Reviewed-by: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 74582375e0be..c9214e3a01df 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -5894,8 +5894,7 @@ static int handle_exception(struct kvm_vcpu *vcpu)
cr2 = vmcs_readl(EXIT_QUALIFICATION);
/* EPT won't cause page fault directly */
WARN_ON_ONCE(!vcpu->arch.apf.host_apf_reason && enable_ept);
- return kvm_handle_page_fault(vcpu, error_code, cr2, NULL, 0,
- true);
+ return kvm_handle_page_fault(vcpu, error_code, cr2, NULL, 0);
}
ex_no = intr_info & INTR_INFO_VECTOR_MASK;