tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 82db6deaf0ed47731fce29fb698bbc9b1ff793ac commit: b8c8255e1d74937638bca666264404952c60395a [7348/9645] arm64: Decouple KVM from CONFIG_ARM64_NMI config: arm64-randconfig-r052-20240518 (https://download.01.org/0day-ci/archive/20240518/202405180744.AsLBV6aC-lkp@i...) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project fa9b1be45088dce1e4b602d451f118128b94237b) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240518/202405180744.AsLBV6aC-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202405180744.AsLBV6aC-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from arch/arm64/kernel/cpufeature.c:67: In file included from include/linux/crash_dump.h:5: In file included from include/linux/kexec.h:18: In file included from include/linux/crash_core.h:6: In file included from include/linux/elfcore.h:11: In file included from include/linux/ptrace.h:10: In file included from include/linux/pid_namespace.h:7: In file included from include/linux/mm.h:2204: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~
arch/arm64/kernel/cpufeature.c:2209:50: error: use of undeclared identifier 'enable_pseudo_nmi'; did you mean 'enable_percpu_nmi'?
2209 | else if (IS_ENABLED(CONFIG_ARM64_PSEUDO_NMI) && enable_pseudo_nmi) { | ^~~~~~~~~~~~~~~~~ | enable_percpu_nmi include/linux/interrupt.h:240:13: note: 'enable_percpu_nmi' declared here 240 | extern void enable_percpu_nmi(unsigned int irq, unsigned int type); | ^
arch/arm64/kernel/cpufeature.c:2209:50: warning: address of function 'enable_percpu_nmi' will always evaluate to 'true' [-Wpointer-bool-conversion]
2209 | else if (IS_ENABLED(CONFIG_ARM64_PSEUDO_NMI) && enable_pseudo_nmi) { | ~~ ^~~~~~~~~~~~~~~~~ arch/arm64/kernel/cpufeature.c:2209:50: note: prefix with the address-of operator to silence this warning 2209 | else if (IS_ENABLED(CONFIG_ARM64_PSEUDO_NMI) && enable_pseudo_nmi) { | ^ | & 2 warnings and 1 error generated.
Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_PRELOAD Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=n] Selected by [y]: - PGP_PRELOAD_PUBLIC_KEYS [=y] && CRYPTO [=y]
vim +2209 arch/arm64/kernel/cpufeature.c
2191 2192 static bool use_nmi(const struct arm64_cpu_capabilities *entry, int scope) 2193 { 2194 if (!has_cpuid_feature(entry, scope)) 2195 return false; 2196 2197 /* 2198 * NMI support was not enabled in the kernel, but can still be 2199 * used by guests. Let the world know. 2200 * 2201 * Having both real and pseudo NMIs enabled simultaneously is 2202 * likely to cause confusion. Since pseudo NMIs must be 2203 * enabled with an explicit command line option, if the user 2204 * has set that option on a system with real NMIs for some 2205 * reason assume they know what they're doing. 2206 */ 2207 if (!IS_ENABLED(CONFIG_ARM64_NMI)) 2208 pr_info("CONFIG_ARM64_NMI disabled, using NMIs for guests only\n");
2209 else if (IS_ENABLED(CONFIG_ARM64_PSEUDO_NMI) && enable_pseudo_nmi) {
2210 pr_info("Pseudo NMI enabled, not using architected NMI\n"); 2211 return false; 2212 } 2213 2214 return true; 2215 } 2216