[arm-platforms:kvm-arm64/pkvm-flags 103/103] arch/arm64/kernel/stacktrace.c:254: undefined reference to `kvm_arm_hyp_stacktrace_page'
kernel test robot
lkp at intel.com
Wed Jun 22 11:07:18 PDT 2022
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/pkvm-flags
head: 04afeb466c4c982055b9d859b85133893d3f97b2
commit: 04afeb466c4c982055b9d859b85133893d3f97b2 [103/103] KVM: arm64: Unwind and dump nVHE hypervisor stacktrace
config: arm64-buildonly-randconfig-r004-20220622 (https://download.01.org/0day-ci/archive/20220623/202206230254.O6toupCu-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=04afeb466c4c982055b9d859b85133893d3f97b2
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms kvm-arm64/pkvm-flags
git checkout 04afeb466c4c982055b9d859b85133893d3f97b2
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
aarch64-linux-ld: arch/arm64/kernel/stacktrace.o: in function `hyp_dump_backtrace':
>> arch/arm64/kernel/stacktrace.c:254: undefined reference to `kvm_arm_hyp_stacktrace_page'
aarch64-linux-ld: arch/arm64/kernel/stacktrace.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `kvm_arm_hyp_stacktrace_page' which may bind externally can not be used when making a shared object; recompile with -fPIC
arch/arm64/kernel/stacktrace.c:254:(.text+0x54c): dangerous relocation: unsupported relocation
>> aarch64-linux-ld: arch/arm64/kernel/stacktrace.c:254: undefined reference to `kvm_arm_hyp_stacktrace_page'
vim +254 arch/arm64/kernel/stacktrace.c
246
247 /**
248 * Symbolizes and dumps the hypervisor backtrace from the shared
249 * stacktrace page.
250 */
251 noinline notrace void hyp_dump_backtrace(unsigned long hyp_offset)
252 {
253 unsigned long *stacktrace_pos =
> 254 (unsigned long *)*this_cpu_ptr(&kvm_arm_hyp_stacktrace_page);
255 unsigned long va_mask = GENMASK_ULL(vabits_actual - 1, 0);
256 unsigned long pc = *stacktrace_pos++;
257
258 kvm_err("nVHE HYP call trace:\n");
259
260 while (pc) {
261 pc &= va_mask; /* Mask tags */
262 pc += hyp_offset; /* Convert to kern addr */
263 kvm_err("[<%016lx>] %pB\n", pc, (void *)pc);
264 pc = *stacktrace_pos++;
265 }
266
267 kvm_err("---- end of nVHE HYP call trace ----\n");
268 }
269 #else /* __KVM_NVHE_HYPERVISOR__ */
270 DEFINE_PER_CPU(unsigned long [PAGE_SIZE/sizeof(long)], overflow_stack)
271 __aligned(16);
272
--
0-DAY CI Kernel Test Service
https://01.org/lkp
More information about the linux-arm-kernel
mailing list