Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Paul,

I love your patch! Yet something to improve:

[auto build test ERROR on kvm/linux-next]
[also build test ERROR on v4.15-rc7 next-20180109]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Paul-Mackerras/KVM-PPC-Book3S-Add-capabilities-for-Meltdown-Spectre-workarounds/20180109-165503
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        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
        make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

   arch/powerpc/kvm/powerpc.c: In function 'check_pseries_safe_cache':
>> arch/powerpc/kvm/powerpc.c:527:27: error: storage size of 'c' isn't known
     struct h_cpu_char_result c;
                              ^
>> arch/powerpc/kvm/powerpc.c:534:7: error: implicit declaration of function 'plpar_get_cpu_characteristics' [-Werror=implicit-function-declaration]
     rc = plpar_get_cpu_characteristics(&c);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/kvm/powerpc.c:536:22: error: 'H_GET_CPU_CHAR_BEHAV_L1_FLUSH_LOW_PRIV' undeclared (first use in this function)
      if (!(c.behavior & H_GET_CPU_CHAR_BEHAV_L1_FLUSH_LOW_PRIV))
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/kvm/powerpc.c:536:22: note: each undeclared identifier is reported only once for each function it appears in
>> arch/powerpc/kvm/powerpc.c:538:27: error: 'H_GET_CPU_CHAR_CHAR_L1D_PRIVATE' undeclared (first use in this function); did you mean 'H_GET_CPU_CHAR_BEHAV_L1_FLUSH_LOW_PRIV'?
      else if ((c.character & H_GET_CPU_CHAR_CHAR_L1D_PRIVATE) &&
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              H_GET_CPU_CHAR_BEHAV_L1_FLUSH_LOW_PRIV
>> arch/powerpc/kvm/powerpc.c:539:21: error: 'H_GET_CPU_CHAR_CHAR_ORI30_L1_FLUSH' undeclared (first use in this function); did you mean 'H_GET_CPU_CHAR_CHAR_L1D_PRIVATE'?
        ((c.character & H_GET_CPU_CHAR_CHAR_ORI30_L1_FLUSH) ||
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        H_GET_CPU_CHAR_CHAR_L1D_PRIVATE
>> arch/powerpc/kvm/powerpc.c:540:21: error: 'H_GET_CPU_CHAR_CHAR_MTTRIG2_L1_FLUSH' undeclared (first use in this function); did you mean 'H_GET_CPU_CHAR_CHAR_ORI30_L1_FLUSH'?
         (c.character & H_GET_CPU_CHAR_CHAR_MTTRIG2_L1_FLUSH)))
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        H_GET_CPU_CHAR_CHAR_ORI30_L1_FLUSH
   arch/powerpc/kvm/powerpc.c:527:27: warning: unused variable 'c' [-Wunused-variable]
     struct h_cpu_char_result c;
                              ^
   arch/powerpc/kvm/powerpc.c: In function 'check_pseries_safe_bounds_check':
   arch/powerpc/kvm/powerpc.c:549:27: error: storage size of 'c' isn't known
     struct h_cpu_char_result c;
                              ^
>> arch/powerpc/kvm/powerpc.c:558:22: error: 'H_GET_CPU_CHAR_BEHAV_SPEC_BAR_BNDS_CHK' undeclared (first use in this function)
      if (!(c.behavior & H_GET_CPU_CHAR_BEHAV_SPEC_BAR_BNDS_CHK))
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/kvm/powerpc.c:560:26: error: 'H_GET_CPU_CHAR_CHAR_ORI31_SPEC_BAR' undeclared (first use in this function); did you mean 'H_GET_CPU_CHAR_BEHAV_SPEC_BAR_BNDS_CHK'?
      else if (c.character & H_GET_CPU_CHAR_CHAR_ORI31_SPEC_BAR)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             H_GET_CPU_CHAR_BEHAV_SPEC_BAR_BNDS_CHK
   arch/powerpc/kvm/powerpc.c:549:27: warning: unused variable 'c' [-Wunused-variable]
     struct h_cpu_char_result c;
                              ^
   arch/powerpc/kvm/powerpc.c: In function 'check_pseries_safe_indirect_branch':
   arch/powerpc/kvm/powerpc.c:569:27: error: storage size of 'c' isn't known
     struct h_cpu_char_result c;
                              ^
>> arch/powerpc/kvm/powerpc.c:578:21: error: 'H_GET_CPU_CHAR_CHAR_BCCTR_SERIAL' undeclared (first use in this function)
      if (c.character & H_GET_CPU_CHAR_CHAR_BCCTR_SERIAL)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/kvm/powerpc.c:569:27: warning: unused variable 'c' [-Wunused-variable]
     struct h_cpu_char_result c;
                              ^
   cc1: some warnings being treated as errors

vim +527 arch/powerpc/kvm/powerpc.c

   523	
   524	#ifdef CONFIG_PPC_PSERIES
   525	static bool check_pseries_safe_cache(int *rp)
   526	{
 > 527		struct h_cpu_char_result c;
   528		unsigned long rc;
   529		int r = 0;
   530	
   531		if (!machine_is(pseries))
   532			return false;
   533	
 > 534		rc = plpar_get_cpu_characteristics(&c);
   535		if (rc == H_SUCCESS) {
 > 536			if (!(c.behavior & H_GET_CPU_CHAR_BEHAV_L1_FLUSH_LOW_PRIV))
   537				r = 2;
 > 538			else if ((c.character & H_GET_CPU_CHAR_CHAR_L1D_PRIVATE) &&
 > 539				 ((c.character & H_GET_CPU_CHAR_CHAR_ORI30_L1_FLUSH) ||
 > 540				  (c.character & H_GET_CPU_CHAR_CHAR_MTTRIG2_L1_FLUSH)))
   541				r = 1;
   542		}
   543		*rp = r;
   544		return true;
   545	}
   546	
   547	static bool check_pseries_safe_bounds_check(int *rp)
   548	{
 > 549		struct h_cpu_char_result c;
   550		unsigned long rc;
   551		int r = 0;
   552	
   553		if (!machine_is(pseries))
   554			return false;
   555	
   556		rc = plpar_get_cpu_characteristics(&c);
   557		if (rc == H_SUCCESS) {
 > 558			if (!(c.behavior & H_GET_CPU_CHAR_BEHAV_SPEC_BAR_BNDS_CHK))
   559				r = 2;
 > 560			else if (c.character & H_GET_CPU_CHAR_CHAR_ORI31_SPEC_BAR)
   561				r = 1;
   562		}
   563		*rp = r;
   564		return true;
   565	}
   566	
   567	static bool check_pseries_safe_indirect_branch(int *rp)
   568	{
   569		struct h_cpu_char_result c;
   570		unsigned long rc;
   571		int r = 0;
   572	
   573		if (!machine_is(pseries))
   574			return false;
   575	
   576		rc = plpar_get_cpu_characteristics(&c);
   577		if (rc == H_SUCCESS) {
 > 578			if (c.character & H_GET_CPU_CHAR_CHAR_BCCTR_SERIAL)
   579				r = 2;
   580		}
   581		*rp = r;
   582		return true;
   583	}
   584	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux