]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Remove redundant root_hpa checks
authorDavid Matlack <dmatlack@google.com>
Thu, 17 Jun 2021 23:19:48 +0000 (23:19 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Jun 2021 10:45:47 +0000 (06:45 -0400)
commit4d5aa5e16f6026da48e7bd6f6331cc256b715c17
tree17c0669262765bc262aee6eeafd4ec375edfdb20
parent579934503a7addb42683942ba68cebcb70455344
KVM: x86/mmu: Remove redundant root_hpa checks

The root_hpa checks below the top-level check in kvm_mmu_page_fault are
theoretically redundant since there is no longer a way for the root_hpa
to be reset during a page fault. The details of why are described in
commit df7e4c2beffb ("KVM: x86/mmu: Move root_hpa validity checks to top
of page fault handler")

__direct_map, kvm_tdp_mmu_map, and get_mmio_spte are all only reachable
through kvm_mmu_page_fault, therefore their root_hpa checks are
redundant.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20210617231948.2591431-5-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/tdp_mmu.c