Well that's embarrassing, I can't believe I didn't catch that in my testing. I'm sure I built the kernel with lockdep enabled several times. Ah well, I can send a fix out for this and the other issue the test bot found. On Sat, Apr 17, 2021 at 8:20 AM kernel test robot <lkp@xxxxxxxxx> wrote: > > tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue > head: 3afb84581509b8d28979d15b5d727366efb3c8e5 > commit: 078d47ee71d6a53657b5917ce1478f10bc173fa5 [149/154] KVM: x86/mmu: Protect the tdp_mmu_roots list with RCU > config: x86_64-allyesconfig (attached as .config) > compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 > reproduce (this is a W=1 build): > # https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?id=078d47ee71d6a53657b5917ce1478f10bc173fa5 > git remote add kvm https://git.kernel.org/pub/scm/virt/kvm/kvm.git > git fetch --no-tags kvm queue > git checkout 078d47ee71d6a53657b5917ce1478f10bc173fa5 > # save the attached .config to linux build tree > make W=1 W=1 ARCH=x86_64 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp@xxxxxxxxx> > > All errors (new ones prefixed by >>): > > In file included from include/linux/rculist.h:11, > from include/linux/pid.h:5, > from include/linux/sched.h:14, > from include/linux/kvm_host.h:12, > from arch/x86/kvm/mmu.h:5, > from arch/x86/kvm/mmu/tdp_mmu.c:3: > arch/x86/kvm/mmu/tdp_mmu.c: In function 'kvm_tdp_mmu_get_vcpu_root_hpa': > >> arch/x86/kvm/mmu/tdp_mmu.c:141:5: error: implicit declaration of function 'lockdep_is_help'; did you mean 'lockdep_is_held'? [-Werror=implicit-function-declaration] > 141 | lockdep_is_help(&kvm->arch.tdp_mmu_pages_lock)) \ > | ^~~~~~~~~~~~~~~ > include/linux/rcupdate.h:318:52: note: in definition of macro 'RCU_LOCKDEP_WARN' > 318 | if (debug_lockdep_rcu_enabled() && !__warned && (c)) { \ > | ^ > include/linux/rculist.h:391:7: note: in expansion of macro '__list_check_rcu' > 391 | for (__list_check_rcu(dummy, ## cond, 0), \ > | ^~~~~~~~~~~~~~~~ > arch/x86/kvm/mmu/tdp_mmu.c:139:2: note: in expansion of macro 'list_for_each_entry_rcu' > 139 | list_for_each_entry_rcu(_root, &_kvm->arch.tdp_mmu_roots, link, \ > | ^~~~~~~~~~~~~~~~~~~~~~~ > arch/x86/kvm/mmu/tdp_mmu.c:188:2: note: in expansion of macro 'for_each_tdp_mmu_root' > 188 | for_each_tdp_mmu_root(kvm, root, kvm_mmu_role_as_id(role)) { > | ^~~~~~~~~~~~~~~~~~~~~ > cc1: some warnings being treated as errors > > > vim +141 arch/x86/kvm/mmu/tdp_mmu.c > > 124 > 125 /* > 126 * Note: this iterator gets and puts references to the roots it iterates over. > 127 * This makes it safe to release the MMU lock and yield within the loop, but > 128 * if exiting the loop early, the caller must drop the reference to the most > 129 * recent root. (Unless keeping a live reference is desirable.) > 130 */ > 131 #define for_each_tdp_mmu_root_yield_safe(_kvm, _root, _as_id) \ > 132 for (_root = tdp_mmu_next_root(_kvm, NULL); \ > 133 _root; \ > 134 _root = tdp_mmu_next_root(_kvm, _root)) \ > 135 if (kvm_mmu_page_as_id(_root) != _as_id) { \ > 136 } else > 137 > 138 #define for_each_tdp_mmu_root(_kvm, _root, _as_id) \ > 139 list_for_each_entry_rcu(_root, &_kvm->arch.tdp_mmu_roots, link, \ > 140 lockdep_is_held_type(&kvm->mmu_lock, 0) || \ > > 141 lockdep_is_help(&kvm->arch.tdp_mmu_pages_lock)) \ > 142 if (kvm_mmu_page_as_id(_root) != _as_id) { \ > 143 } else > 144 > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx