return;
 
        r = kvm_mmu_do_page_fault(vcpu, work->cr2_or_gpa, work->arch.error_code,
-                                 true, NULL);
+                                 true, NULL, NULL);
 
        /*
         * Account fixed page faults, otherwise they'll never be counted, but
                vcpu->stat.pf_taken++;
 
                r = kvm_mmu_do_page_fault(vcpu, cr2_or_gpa, error_code, false,
-                                         &emulation_type);
+                                         &emulation_type, NULL);
                if (KVM_BUG_ON(r == RET_PF_INVALID, vcpu->kvm))
                        return -EIO;
        }
 
 }
 
 static inline int kvm_mmu_do_page_fault(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,
-                                       u64 err, bool prefetch, int *emulation_type)
+                                       u64 err, bool prefetch,
+                                       int *emulation_type, u8 *level)
 {
        struct kvm_page_fault fault = {
                .addr = cr2_or_gpa,
 
        if (fault.write_fault_to_shadow_pgtable && emulation_type)
                *emulation_type |= EMULTYPE_WRITE_PF_TO_SP;
+       if (level)
+               *level = fault.goal_level;
 
        return r;
 }