]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
KVM: nSVM: move kvm_set_cr3() after nested_svm_uninit_mmu_context()
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 10 Jul 2020 14:11:54 +0000 (16:11 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jul 2020 16:56:30 +0000 (12:56 -0400)
commitbf7dea425327c5da12f540a1595f22770597e496
treee0c3fd4b453855af3a8f1e380f85ce11fc92ee75
parent62156f6cd15ab27cf19a97161b5f1820951a36b1
KVM: nSVM: move kvm_set_cr3() after nested_svm_uninit_mmu_context()

kvm_mmu_new_pgd() refers to arch.mmu and at this point it still references
arch.guest_mmu while arch.root_mmu is expected.

Note, the change is effectively a nop: when !npt_enabled,
nested_svm_uninit_mmu_context() does nothing (as we don't do
nested_svm_init_mmu_context()) and with npt_enabled we don't
do kvm_set_cr3().  However, it will matter when we move the
call to kvm_mmu_new_pgd into nested_svm_load_cr3().

No functional change intended.

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