]> git.baikalelectronics.ru Git - kernel.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)
commit552aa392175288904611204f27398d59f98d85f9
treecaf10a2eb37095d4de99dcc0e1cedd9e399695e9
parent29dd511f814bd84e28fb8880becf531860280314
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