KVM: x86/mmu: Always use current mmu's role when loading new PGD
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 22 Nov 2021 18:18:23 +0000 (13:18 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Feb 2022 13:20:18 +0000 (08:20 -0500)
commitd2e5f3334169ab1bbbf13902e9fc8ef605ba824d
tree96d174f7cd4e62b4a6dafe1f4ca6915d291d8657
parent3cffc89d9d0795a74ee1b1027bba2f6099b51c33
KVM: x86/mmu: Always use current mmu's role when loading new PGD

Since the guest PGD is now loaded after the MMU has been set up
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.

Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c