On Fri, Feb 04, 2022 at 06:57:02AM -0500, Paolo Bonzini wrote:
Since the guest PGD is now loaded after the MMU has been set upCouldn't the !tdp_enabled case be called via kvm_set_cr3() ->
completely, the desired role for a cache hit is simply the current
mmu_role. There is no need to compute it again, so __kvm_mmu_new_pgd
can be folded in kvm_mmu_new_pgd.
As an aside, the !tdp_enabled case in the function was dead code,
and that also gets mopped up as a side effect.
kvm_mmu_new_pgd()?