KVM: x86/mmu: Remove redundant root_hpa checks
mainline inclusion from mainline-v5.14-rc1 commit 0485cf8d category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I7S3VQ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0485cf8dbe964b6cc485178da6ee8ae7b2d0d15c ---------------------------------------------------------------------- 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 ddce6208 ("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> Signed-off-by:
Yu Zhang <yu.c.zhang@linux.intel.com>
Loading
Please sign in to comment