aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2008-08-28 18:27:15 +0300
committerAvi Kivity <avi@qumranet.com>2008-10-15 10:15:24 +0200
commit48d150394999c542b2e828f03da226842950d46a (patch)
tree980bd74d0b9df6c68aa0244f679e7edbdc34fff7 /arch/x86/kvm
parent3201b5d9f0f7ef392886cd76dcd2c69186d9d5cd (diff)
KVM: SVM: No need to unprotect memory during event injection when using npt
No memory is protected anyway. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/svm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index be86c096385..60228888d1b 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1021,7 +1021,7 @@ static int pf_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run)
if (npt_enabled)
svm_flush_tlb(&svm->vcpu);
- if (event_injection)
+ if (!npt_enabled && event_injection)
kvm_mmu_unprotect_page_virt(&svm->vcpu, fault_address);
return kvm_mmu_page_fault(&svm->vcpu, fault_address, error_code);
}