Hi Alistair, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.7 next-20200529] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Alistair-Popple/powerpc-kvm-Enable-support-for-ISA-v3-1-guests/20200602-140435 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-defconfig (attached as .config) compiler: powerpc64-linux-gcc (GCC) 9.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 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <lkp@xxxxxxxxx> All error/warnings (new ones prefixed by >>, old ones prefixed by <<): arch/powerpc/kvm/book3s_hv.c: In function 'kvmppc_set_arch_compat': << from arch/powerpc/kvm/book3s_hv.c:81: >> arch/powerpc/kvm/book3s_hv.c:356:22: error: 'CPU_FTR_ARCH_31' undeclared (first use in this function); did you mean 'CPU_FTR_ARCH_300'? 356 | if (cpu_has_feature(CPU_FTR_ARCH_31)) | ^~~~~~~~~~~~~~~ | CPU_FTR_ARCH_300 arch/powerpc/kvm/book3s_hv.c:356:22: note: each undeclared identifier is reported only once for each function it appears in << from arch/powerpc/kvm/book3s_hv.c:81: >> arch/powerpc/kvm/book3s_hv.c:348:25: error: 'PCR_ARCH_300' undeclared (first use in this function); did you mean 'PVR_ARCH_300'? 348 | #define PCR_ARCH_31 (PCR_ARCH_300 << 1) | ^~~~~~~~~~~~ << from arch/powerpc/kvm/book3s_hv.c:81: >> arch/powerpc/kvm/book3s_hv.c:357:18: note: in expansion of macro 'PCR_ARCH_31' 357 | host_pcr_bit = PCR_ARCH_31; | ^~~~~~~~~~~ arch/powerpc/kvm/book3s_hv.c: At top level: arch/powerpc/kvm/book3s_hv.c:3521:5: error: no previous prototype for 'kvmhv_p9_guest_entry' [-Werror=missing-prototypes] 3521 | int kvmhv_p9_guest_entry(struct kvm_vcpu *vcpu, u64 time_limit, | ^~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors vim +356 arch/powerpc/kvm/book3s_hv.c 346 347 /* Dummy value used in computing PCR value below */ > 348 #define PCR_ARCH_31 (PCR_ARCH_300 << 1) 349 350 static int kvmppc_set_arch_compat(struct kvm_vcpu *vcpu, u32 arch_compat) 351 { 352 unsigned long host_pcr_bit = 0, guest_pcr_bit = 0; 353 struct kvmppc_vcore *vc = vcpu->arch.vcore; 354 355 /* We can (emulate) our own architecture version and anything older */ > 356 if (cpu_has_feature(CPU_FTR_ARCH_31)) > 357 host_pcr_bit = PCR_ARCH_31; 358 else if (cpu_has_feature(CPU_FTR_ARCH_300)) 359 host_pcr_bit = PCR_ARCH_300; 360 else if (cpu_has_feature(CPU_FTR_ARCH_207S)) 361 host_pcr_bit = PCR_ARCH_207; 362 else if (cpu_has_feature(CPU_FTR_ARCH_206)) 363 host_pcr_bit = PCR_ARCH_206; 364 else 365 host_pcr_bit = PCR_ARCH_205; 366 367 /* Determine lowest PCR bit needed to run guest in given PVR level */ 368 guest_pcr_bit = host_pcr_bit; 369 if (arch_compat) { 370 switch (arch_compat) { 371 case PVR_ARCH_205: 372 guest_pcr_bit = PCR_ARCH_205; 373 break; 374 case PVR_ARCH_206: 375 case PVR_ARCH_206p: 376 guest_pcr_bit = PCR_ARCH_206; 377 break; 378 case PVR_ARCH_207: 379 guest_pcr_bit = PCR_ARCH_207; 380 break; 381 case PVR_ARCH_300: 382 guest_pcr_bit = PCR_ARCH_300; 383 break; 384 case PVR_ARCH_31: 385 guest_pcr_bit = PCR_ARCH_31; 386 break; 387 default: 388 return -EINVAL; 389 } 390 } 391 392 /* Check requested PCR bits don't exceed our capabilities */ 393 if (guest_pcr_bit > host_pcr_bit) 394 return -EINVAL; 395 396 spin_lock(&vc->lock); 397 vc->arch_compat = arch_compat; 398 /* 399 * Set all PCR bits for which guest_pcr_bit <= bit < host_pcr_bit 400 * Also set all reserved PCR bits 401 */ 402 vc->pcr = (host_pcr_bit - guest_pcr_bit) | PCR_MASK; 403 spin_unlock(&vc->lock); 404 405 return 0; 406 } 407 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip