WARN if root_hpa is invalid when handling a page fault. The check on
root_hpa exists for historical reasons that no longer apply to the
current KVM code base.
Remove an equivalent debug-only warning in direct_page_fault(), whose
existence more or less confirms that root_hpa should always be valid
when handling a page fault.
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
kvm_pfn_t pfn;
int level, r;
- MMU_WARN_ON(!VALID_PAGE(vcpu->arch.mmu->root_hpa));
-
if (page_fault_handle_page_track(vcpu, error_code, gfn))
return RET_PF_EMULATE;
int r, emulation_type = 0;
bool direct = vcpu->arch.mmu->direct_map;
- if (!VALID_PAGE(vcpu->arch.mmu->root_hpa))
+ if (WARN_ON(!VALID_PAGE(vcpu->arch.mmu->root_hpa)))
return RET_PF_RETRY;
/* With shadow page tables, fault_address contains a GVA or nGPA. */