KVM: x86/mmu: do not pass vcpu to root freeing functions
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 21 Feb 2022 14:31:51 +0000 (09:31 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Feb 2022 13:20:17 +0000 (08:20 -0500)
commit0c1c92f15f7600a03377e3211983f3571c08ad4b
treec5c57d8eb0d1da7ecccfb69e8247e33fabb636a9
parent594bef7931089cbdeaf7d8954d54535c8ddd4b30
KVM: x86/mmu: do not pass vcpu to root freeing functions

These functions only operate on a given MMU, of which there is more
than one in a vCPU (we care about two, because the third does not have
any roots and is only used to walk guest page tables).  They do need a
struct kvm in order to lock the mmu_lock, but they do not needed anything
else in the struct kvm_vcpu.  So, pass the vcpu->kvm directly to them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/x86.c