]> www.infradead.org Git - users/dwmw2/linux.git/commit
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>
Mon, 21 Feb 2022 14:35:01 +0000 (09:35 -0500)
commit0390053b9c64e7f4a25b3773fca11a24e8bb03d9
tree1e191ac7ebdbb607d05d40bc5ea5dfd9cded0a3a
parenta5ad3cc514e1741c7101e96fa5b741cb8dd4017e
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