]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
KVM: MMU: stop dereferencing vcpu->arch.mmu to get the context for MMU init
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jul 2020 14:11:50 +0000 (16:11 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jul 2020 16:53:58 +0000 (12:53 -0400)
commit8c008659aa43be97c60c1633074b8f52f9f4445c
treecaf10a2eb37095d4de99dcc0e1cedd9e399695e9
parent0f04a2ac4fe96bbf05b7ac7d3e94598db550d6b8
KVM: MMU: stop dereferencing vcpu->arch.mmu to get the context for MMU init

kvm_init_shadow_mmu() was actually the only function that could be called
with different vcpu->arch.mmu values.  Now that kvm_init_shadow_npt_mmu()
is separated from kvm_init_shadow_mmu(), we always know the MMU context
we need to use and there is no need to dereference vcpu->arch.mmu pointer.

Based on a patch by Vitaly Kuznetsov <vkuznets@redhat.com>.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20200710141157.1640173-3-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c