KVM: x86/mmu: Store the address space ID in the TDP iterator
authorSean Christopherson <seanjc@google.com>
Mon, 15 Mar 2021 23:38:03 +0000 (16:38 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Mar 2021 18:16:34 +0000 (14:16 -0400)
commit08889894cc82bc3b213bdb192f274358e5a6b78d
tree78145b0f09f4a5e0a4ca0d296911a21f1101efc5
parentb601c3bc9d5053065acdaa1481c21481d0dc3f10
KVM: x86/mmu: Store the address space ID in the TDP iterator

Store the address space ID in the TDP iterator so that it can be
retrieved without having to bounce through the root shadow page.  This
streamlines the code and fixes a Sparse warning about not properly using
rcu_dereference() when grabbing the ID from the root on the fly.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Ben Gardon <bgardon@google.com>
Message-Id: <20210315233803.2706477-5-bgardon@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu_internal.h
arch/x86/kvm/mmu/tdp_iter.c
arch/x86/kvm/mmu/tdp_iter.h
arch/x86/kvm/mmu/tdp_mmu.c