]> 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)
commit80365f1be7f9605a7bce3f98c3ed533f282ef497
tree96d174f7cd4e62b4a6dafe1f4ca6915d291d8657
parentd1ab134df02b465063ddfef49f9f5f5965e06a9d
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