]> git.baikalelectronics.ru Git - kernel.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>
Fri, 25 Feb 2022 13:20:18 +0000 (08:20 -0500)
commit368eea79b65913922bd39eb51467c50f7f505f9e
tree96d174f7cd4e62b4a6dafe1f4ca6915d291d8657
parent60299023231612e9bc3163b968873eddc19a0e0c
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