diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 2883ce8..9f8b02d 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -314,6 +314,19 @@ void kvm_inject_page_fault(struct kvm_vcpu *vcpu, unsigned long addr,
kvm_queue_exception_e(vcpu, PF_VECTOR, error_code)
}
+void kvm_propagate_fault(struct kvm_vcpu *vcpu, unsigned long addr, u32 error_code)
+{
+ u32 nested, error;
+
+ nested = error_code & PFERR_NESTED_MASK;
+ error = error_code & ~PFERR_NESTED_MASK;
+
+ if (vcpu->arch.mmu.nested && !(error_code && PFERR_NESTED_MASK))
+ vcpu->arch.nested_mmu.inject_page_fault(vcpu, addr, error);
+ else
+ vcpu->arch.mmu.inject_page_fault(vcpu, addr, error);
+}
+
void kvm_inject_nmi(struct kvm_vcpu *vcpu)
{
vcpu->arch.nmi_pending = 1;