LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* arch/mips/kvm/vz.c:1552: warning: expecting prototype for kvm_trap_vz_handle_cop_unusuable(). Prototype was for kvm_trap_vz_handle_cop_unusable() instead
@ 2021-11-12 18:16 kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-11-12 18:16 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 5507 bytes --]

Hi Thomas,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5833291ab6de9c3e2374336b51c814e515e8f3a5
commit: 45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 MIPS: Remove KVM_TE support
date:   8 months ago
config: mips-randconfig-r003-20211015 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 11.2.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/torvalds/linux.git/commit/?id=45c7e8af4a5e3f0bea4ac209eea34118dd57ac64
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 45c7e8af4a5e3f0bea4ac209eea34118dd57ac64
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/kvm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   arch/mips/kvm/vz.c:471: warning: Function parameter or member 'out_compare' not described in '_kvm_vz_save_htimer'
   arch/mips/kvm/vz.c:471: warning: Function parameter or member 'out_cause' not described in '_kvm_vz_save_htimer'
   arch/mips/kvm/vz.c:471: warning: Excess function parameter 'compare' description in '_kvm_vz_save_htimer'
   arch/mips/kvm/vz.c:471: warning: Excess function parameter 'cause' description in '_kvm_vz_save_htimer'
>> arch/mips/kvm/vz.c:1552: warning: expecting prototype for kvm_trap_vz_handle_cop_unusuable(). Prototype was for kvm_trap_vz_handle_cop_unusable() instead


vim +1552 arch/mips/kvm/vz.c

c992a4f6a9b0a3 James Hogan   2017-03-14  1543  
c992a4f6a9b0a3 James Hogan   2017-03-14  1544  /**
c992a4f6a9b0a3 James Hogan   2017-03-14  1545   * kvm_trap_vz_handle_cop_unusuable() - Guest used unusable coprocessor.
c992a4f6a9b0a3 James Hogan   2017-03-14  1546   * @vcpu:	Virtual CPU context.
c992a4f6a9b0a3 James Hogan   2017-03-14  1547   *
c992a4f6a9b0a3 James Hogan   2017-03-14  1548   * Handle when the guest attempts to use a coprocessor which hasn't been allowed
c992a4f6a9b0a3 James Hogan   2017-03-14  1549   * by the root context.
c992a4f6a9b0a3 James Hogan   2017-03-14  1550   */
c992a4f6a9b0a3 James Hogan   2017-03-14  1551  static int kvm_trap_vz_handle_cop_unusable(struct kvm_vcpu *vcpu)
c992a4f6a9b0a3 James Hogan   2017-03-14 @1552  {
c992a4f6a9b0a3 James Hogan   2017-03-14  1553  	u32 cause = vcpu->arch.host_cp0_cause;
c992a4f6a9b0a3 James Hogan   2017-03-14  1554  	enum emulation_result er = EMULATE_FAIL;
c992a4f6a9b0a3 James Hogan   2017-03-14  1555  	int ret = RESUME_GUEST;
c992a4f6a9b0a3 James Hogan   2017-03-14  1556  
c992a4f6a9b0a3 James Hogan   2017-03-14  1557  	if (((cause & CAUSEF_CE) >> CAUSEB_CE) == 1) {
c992a4f6a9b0a3 James Hogan   2017-03-14  1558  		/*
c992a4f6a9b0a3 James Hogan   2017-03-14  1559  		 * If guest FPU not present, the FPU operation should have been
c992a4f6a9b0a3 James Hogan   2017-03-14  1560  		 * treated as a reserved instruction!
c992a4f6a9b0a3 James Hogan   2017-03-14  1561  		 * If FPU already in use, we shouldn't get this at all.
c992a4f6a9b0a3 James Hogan   2017-03-14  1562  		 */
c992a4f6a9b0a3 James Hogan   2017-03-14  1563  		if (WARN_ON(!kvm_mips_guest_has_fpu(&vcpu->arch) ||
c992a4f6a9b0a3 James Hogan   2017-03-14  1564  			    vcpu->arch.aux_inuse & KVM_MIPS_AUX_FPU)) {
c992a4f6a9b0a3 James Hogan   2017-03-14  1565  			preempt_enable();
c992a4f6a9b0a3 James Hogan   2017-03-14  1566  			return EMULATE_FAIL;
c992a4f6a9b0a3 James Hogan   2017-03-14  1567  		}
c992a4f6a9b0a3 James Hogan   2017-03-14  1568  
c992a4f6a9b0a3 James Hogan   2017-03-14  1569  		kvm_own_fpu(vcpu);
c992a4f6a9b0a3 James Hogan   2017-03-14  1570  		er = EMULATE_DONE;
c992a4f6a9b0a3 James Hogan   2017-03-14  1571  	}
c992a4f6a9b0a3 James Hogan   2017-03-14  1572  	/* other coprocessors not handled */
c992a4f6a9b0a3 James Hogan   2017-03-14  1573  
c992a4f6a9b0a3 James Hogan   2017-03-14  1574  	switch (er) {
c992a4f6a9b0a3 James Hogan   2017-03-14  1575  	case EMULATE_DONE:
c992a4f6a9b0a3 James Hogan   2017-03-14  1576  		ret = RESUME_GUEST;
c992a4f6a9b0a3 James Hogan   2017-03-14  1577  		break;
c992a4f6a9b0a3 James Hogan   2017-03-14  1578  
c992a4f6a9b0a3 James Hogan   2017-03-14  1579  	case EMULATE_FAIL:
c34b26b98caca4 Tianjia Zhang 2020-06-23  1580  		vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
c992a4f6a9b0a3 James Hogan   2017-03-14  1581  		ret = RESUME_HOST;
c992a4f6a9b0a3 James Hogan   2017-03-14  1582  		break;
c992a4f6a9b0a3 James Hogan   2017-03-14  1583  
c992a4f6a9b0a3 James Hogan   2017-03-14  1584  	default:
c992a4f6a9b0a3 James Hogan   2017-03-14  1585  		BUG();
c992a4f6a9b0a3 James Hogan   2017-03-14  1586  	}
c992a4f6a9b0a3 James Hogan   2017-03-14  1587  	return ret;
c992a4f6a9b0a3 James Hogan   2017-03-14  1588  }
c992a4f6a9b0a3 James Hogan   2017-03-14  1589  

:::::: The code at line 1552 was first introduced by commit
:::::: c992a4f6a9b0a37c8bd7dfc727ecc3fed125c16b KVM: MIPS: Implement VZ support

:::::: TO: James Hogan <james.hogan@imgtec.com>
:::::: CC: James Hogan <james.hogan@imgtec.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31231 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* arch/mips/kvm/vz.c:1552: warning: expecting prototype for kvm_trap_vz_handle_cop_unusuable(). Prototype was for kvm_trap_vz_handle_cop_unusable() instead
@ 2022-01-28 21:03 kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-01-28 21:03 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: llvm, kbuild-all, linux-kernel

Hi Thomas,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   145d9b498fc827b79c1260b4caa29a8e59d4c2b9
commit: 45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 MIPS: Remove KVM_TE support
date:   11 months ago
config: mips-malta_kvm_defconfig (https://download.01.org/0day-ci/archive/20220129/202201290312.Zn2lLZub-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 33b45ee44b1f32ffdbc995e6fec806271b4b3ba4)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=45c7e8af4a5e3f0bea4ac209eea34118dd57ac64
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 45c7e8af4a5e3f0bea4ac209eea34118dd57ac64
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/kvm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   arch/mips/kvm/vz.c:471: warning: Function parameter or member 'out_compare' not described in '_kvm_vz_save_htimer'
   arch/mips/kvm/vz.c:471: warning: Function parameter or member 'out_cause' not described in '_kvm_vz_save_htimer'
   arch/mips/kvm/vz.c:471: warning: Excess function parameter 'compare' description in '_kvm_vz_save_htimer'
   arch/mips/kvm/vz.c:471: warning: Excess function parameter 'cause' description in '_kvm_vz_save_htimer'
>> arch/mips/kvm/vz.c:1552: warning: expecting prototype for kvm_trap_vz_handle_cop_unusuable(). Prototype was for kvm_trap_vz_handle_cop_unusable() instead


vim +1552 arch/mips/kvm/vz.c

c992a4f6a9b0a3 James Hogan   2017-03-14  1543  
c992a4f6a9b0a3 James Hogan   2017-03-14  1544  /**
c992a4f6a9b0a3 James Hogan   2017-03-14  1545   * kvm_trap_vz_handle_cop_unusuable() - Guest used unusable coprocessor.
c992a4f6a9b0a3 James Hogan   2017-03-14  1546   * @vcpu:	Virtual CPU context.
c992a4f6a9b0a3 James Hogan   2017-03-14  1547   *
c992a4f6a9b0a3 James Hogan   2017-03-14  1548   * Handle when the guest attempts to use a coprocessor which hasn't been allowed
c992a4f6a9b0a3 James Hogan   2017-03-14  1549   * by the root context.
c992a4f6a9b0a3 James Hogan   2017-03-14  1550   */
c992a4f6a9b0a3 James Hogan   2017-03-14  1551  static int kvm_trap_vz_handle_cop_unusable(struct kvm_vcpu *vcpu)
c992a4f6a9b0a3 James Hogan   2017-03-14 @1552  {
c992a4f6a9b0a3 James Hogan   2017-03-14  1553  	u32 cause = vcpu->arch.host_cp0_cause;
c992a4f6a9b0a3 James Hogan   2017-03-14  1554  	enum emulation_result er = EMULATE_FAIL;
c992a4f6a9b0a3 James Hogan   2017-03-14  1555  	int ret = RESUME_GUEST;
c992a4f6a9b0a3 James Hogan   2017-03-14  1556  
c992a4f6a9b0a3 James Hogan   2017-03-14  1557  	if (((cause & CAUSEF_CE) >> CAUSEB_CE) == 1) {
c992a4f6a9b0a3 James Hogan   2017-03-14  1558  		/*
c992a4f6a9b0a3 James Hogan   2017-03-14  1559  		 * If guest FPU not present, the FPU operation should have been
c992a4f6a9b0a3 James Hogan   2017-03-14  1560  		 * treated as a reserved instruction!
c992a4f6a9b0a3 James Hogan   2017-03-14  1561  		 * If FPU already in use, we shouldn't get this at all.
c992a4f6a9b0a3 James Hogan   2017-03-14  1562  		 */
c992a4f6a9b0a3 James Hogan   2017-03-14  1563  		if (WARN_ON(!kvm_mips_guest_has_fpu(&vcpu->arch) ||
c992a4f6a9b0a3 James Hogan   2017-03-14  1564  			    vcpu->arch.aux_inuse & KVM_MIPS_AUX_FPU)) {
c992a4f6a9b0a3 James Hogan   2017-03-14  1565  			preempt_enable();
c992a4f6a9b0a3 James Hogan   2017-03-14  1566  			return EMULATE_FAIL;
c992a4f6a9b0a3 James Hogan   2017-03-14  1567  		}
c992a4f6a9b0a3 James Hogan   2017-03-14  1568  
c992a4f6a9b0a3 James Hogan   2017-03-14  1569  		kvm_own_fpu(vcpu);
c992a4f6a9b0a3 James Hogan   2017-03-14  1570  		er = EMULATE_DONE;
c992a4f6a9b0a3 James Hogan   2017-03-14  1571  	}
c992a4f6a9b0a3 James Hogan   2017-03-14  1572  	/* other coprocessors not handled */
c992a4f6a9b0a3 James Hogan   2017-03-14  1573  
c992a4f6a9b0a3 James Hogan   2017-03-14  1574  	switch (er) {
c992a4f6a9b0a3 James Hogan   2017-03-14  1575  	case EMULATE_DONE:
c992a4f6a9b0a3 James Hogan   2017-03-14  1576  		ret = RESUME_GUEST;
c992a4f6a9b0a3 James Hogan   2017-03-14  1577  		break;
c992a4f6a9b0a3 James Hogan   2017-03-14  1578  
c992a4f6a9b0a3 James Hogan   2017-03-14  1579  	case EMULATE_FAIL:
c34b26b98caca4 Tianjia Zhang 2020-06-23  1580  		vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
c992a4f6a9b0a3 James Hogan   2017-03-14  1581  		ret = RESUME_HOST;
c992a4f6a9b0a3 James Hogan   2017-03-14  1582  		break;
c992a4f6a9b0a3 James Hogan   2017-03-14  1583  
c992a4f6a9b0a3 James Hogan   2017-03-14  1584  	default:
c992a4f6a9b0a3 James Hogan   2017-03-14  1585  		BUG();
c992a4f6a9b0a3 James Hogan   2017-03-14  1586  	}
c992a4f6a9b0a3 James Hogan   2017-03-14  1587  	return ret;
c992a4f6a9b0a3 James Hogan   2017-03-14  1588  }
c992a4f6a9b0a3 James Hogan   2017-03-14  1589  

:::::: The code at line 1552 was first introduced by commit
:::::: c992a4f6a9b0a37c8bd7dfc727ecc3fed125c16b KVM: MIPS: Implement VZ support

:::::: TO: James Hogan <james.hogan@imgtec.com>
:::::: CC: James Hogan <james.hogan@imgtec.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* arch/mips/kvm/vz.c:1552: warning: expecting prototype for kvm_trap_vz_handle_cop_unusuable(). Prototype was for kvm_trap_vz_handle_cop_unusable() instead
@ 2021-12-09 21:04 kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-12-09 21:04 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: llvm, kbuild-all, linux-kernel

Hi Thomas,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2a987e65025e2b79c6d453b78cb5985ac6e5eb26
commit: 45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 MIPS: Remove KVM_TE support
date:   9 months ago
config: mips-randconfig-r005-20211209 (https://download.01.org/0day-ci/archive/20211210/202112100504.EqkymVXu-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=45c7e8af4a5e3f0bea4ac209eea34118dd57ac64
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 45c7e8af4a5e3f0bea4ac209eea34118dd57ac64
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/crypto/ arch/mips/kvm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   arch/mips/kvm/vz.c:471: warning: Function parameter or member 'out_compare' not described in '_kvm_vz_save_htimer'
   arch/mips/kvm/vz.c:471: warning: Function parameter or member 'out_cause' not described in '_kvm_vz_save_htimer'
   arch/mips/kvm/vz.c:471: warning: Excess function parameter 'compare' description in '_kvm_vz_save_htimer'
   arch/mips/kvm/vz.c:471: warning: Excess function parameter 'cause' description in '_kvm_vz_save_htimer'
>> arch/mips/kvm/vz.c:1552: warning: expecting prototype for kvm_trap_vz_handle_cop_unusuable(). Prototype was for kvm_trap_vz_handle_cop_unusable() instead


vim +1552 arch/mips/kvm/vz.c

c992a4f6a9b0a37 James Hogan   2017-03-14  1543  
c992a4f6a9b0a37 James Hogan   2017-03-14  1544  /**
c992a4f6a9b0a37 James Hogan   2017-03-14  1545   * kvm_trap_vz_handle_cop_unusuable() - Guest used unusable coprocessor.
c992a4f6a9b0a37 James Hogan   2017-03-14  1546   * @vcpu:	Virtual CPU context.
c992a4f6a9b0a37 James Hogan   2017-03-14  1547   *
c992a4f6a9b0a37 James Hogan   2017-03-14  1548   * Handle when the guest attempts to use a coprocessor which hasn't been allowed
c992a4f6a9b0a37 James Hogan   2017-03-14  1549   * by the root context.
c992a4f6a9b0a37 James Hogan   2017-03-14  1550   */
c992a4f6a9b0a37 James Hogan   2017-03-14  1551  static int kvm_trap_vz_handle_cop_unusable(struct kvm_vcpu *vcpu)
c992a4f6a9b0a37 James Hogan   2017-03-14 @1552  {
c992a4f6a9b0a37 James Hogan   2017-03-14  1553  	u32 cause = vcpu->arch.host_cp0_cause;
c992a4f6a9b0a37 James Hogan   2017-03-14  1554  	enum emulation_result er = EMULATE_FAIL;
c992a4f6a9b0a37 James Hogan   2017-03-14  1555  	int ret = RESUME_GUEST;
c992a4f6a9b0a37 James Hogan   2017-03-14  1556  
c992a4f6a9b0a37 James Hogan   2017-03-14  1557  	if (((cause & CAUSEF_CE) >> CAUSEB_CE) == 1) {
c992a4f6a9b0a37 James Hogan   2017-03-14  1558  		/*
c992a4f6a9b0a37 James Hogan   2017-03-14  1559  		 * If guest FPU not present, the FPU operation should have been
c992a4f6a9b0a37 James Hogan   2017-03-14  1560  		 * treated as a reserved instruction!
c992a4f6a9b0a37 James Hogan   2017-03-14  1561  		 * If FPU already in use, we shouldn't get this at all.
c992a4f6a9b0a37 James Hogan   2017-03-14  1562  		 */
c992a4f6a9b0a37 James Hogan   2017-03-14  1563  		if (WARN_ON(!kvm_mips_guest_has_fpu(&vcpu->arch) ||
c992a4f6a9b0a37 James Hogan   2017-03-14  1564  			    vcpu->arch.aux_inuse & KVM_MIPS_AUX_FPU)) {
c992a4f6a9b0a37 James Hogan   2017-03-14  1565  			preempt_enable();
c992a4f6a9b0a37 James Hogan   2017-03-14  1566  			return EMULATE_FAIL;
c992a4f6a9b0a37 James Hogan   2017-03-14  1567  		}
c992a4f6a9b0a37 James Hogan   2017-03-14  1568  
c992a4f6a9b0a37 James Hogan   2017-03-14  1569  		kvm_own_fpu(vcpu);
c992a4f6a9b0a37 James Hogan   2017-03-14  1570  		er = EMULATE_DONE;
c992a4f6a9b0a37 James Hogan   2017-03-14  1571  	}
c992a4f6a9b0a37 James Hogan   2017-03-14  1572  	/* other coprocessors not handled */
c992a4f6a9b0a37 James Hogan   2017-03-14  1573  
c992a4f6a9b0a37 James Hogan   2017-03-14  1574  	switch (er) {
c992a4f6a9b0a37 James Hogan   2017-03-14  1575  	case EMULATE_DONE:
c992a4f6a9b0a37 James Hogan   2017-03-14  1576  		ret = RESUME_GUEST;
c992a4f6a9b0a37 James Hogan   2017-03-14  1577  		break;
c992a4f6a9b0a37 James Hogan   2017-03-14  1578  
c992a4f6a9b0a37 James Hogan   2017-03-14  1579  	case EMULATE_FAIL:
c34b26b98caca48 Tianjia Zhang 2020-06-23  1580  		vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
c992a4f6a9b0a37 James Hogan   2017-03-14  1581  		ret = RESUME_HOST;
c992a4f6a9b0a37 James Hogan   2017-03-14  1582  		break;
c992a4f6a9b0a37 James Hogan   2017-03-14  1583  
c992a4f6a9b0a37 James Hogan   2017-03-14  1584  	default:
c992a4f6a9b0a37 James Hogan   2017-03-14  1585  		BUG();
c992a4f6a9b0a37 James Hogan   2017-03-14  1586  	}
c992a4f6a9b0a37 James Hogan   2017-03-14  1587  	return ret;
c992a4f6a9b0a37 James Hogan   2017-03-14  1588  }
c992a4f6a9b0a37 James Hogan   2017-03-14  1589  

:::::: The code at line 1552 was first introduced by commit
:::::: c992a4f6a9b0a37c8bd7dfc727ecc3fed125c16b KVM: MIPS: Implement VZ support

:::::: TO: James Hogan <james.hogan@imgtec.com>
:::::: CC: James Hogan <james.hogan@imgtec.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* arch/mips/kvm/vz.c:1552: warning: expecting prototype for kvm_trap_vz_handle_cop_unusuable(). Prototype was for kvm_trap_vz_handle_cop_unusable() instead
@ 2021-09-06 13:46 kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-09-06 13:46 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: llvm, kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 5683 bytes --]

Hi Thomas,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   27151f177827d478508e756c7657273261aaf8a9
commit: 45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 MIPS: Remove KVM_TE support
date:   6 months ago
config: mips-randconfig-r004-20210906 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6fe2beba7d2a41964af658c8c59dd172683ef739)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=45c7e8af4a5e3f0bea4ac209eea34118dd57ac64
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 45c7e8af4a5e3f0bea4ac209eea34118dd57ac64
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/kvm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   arch/mips/kvm/vz.c:471: warning: Function parameter or member 'out_compare' not described in '_kvm_vz_save_htimer'
   arch/mips/kvm/vz.c:471: warning: Function parameter or member 'out_cause' not described in '_kvm_vz_save_htimer'
   arch/mips/kvm/vz.c:471: warning: Excess function parameter 'compare' description in '_kvm_vz_save_htimer'
   arch/mips/kvm/vz.c:471: warning: Excess function parameter 'cause' description in '_kvm_vz_save_htimer'
>> arch/mips/kvm/vz.c:1552: warning: expecting prototype for kvm_trap_vz_handle_cop_unusuable(). Prototype was for kvm_trap_vz_handle_cop_unusable() instead


vim +1552 arch/mips/kvm/vz.c

c992a4f6a9b0a3 James Hogan   2017-03-14  1543  
c992a4f6a9b0a3 James Hogan   2017-03-14  1544  /**
c992a4f6a9b0a3 James Hogan   2017-03-14  1545   * kvm_trap_vz_handle_cop_unusuable() - Guest used unusable coprocessor.
c992a4f6a9b0a3 James Hogan   2017-03-14  1546   * @vcpu:	Virtual CPU context.
c992a4f6a9b0a3 James Hogan   2017-03-14  1547   *
c992a4f6a9b0a3 James Hogan   2017-03-14  1548   * Handle when the guest attempts to use a coprocessor which hasn't been allowed
c992a4f6a9b0a3 James Hogan   2017-03-14  1549   * by the root context.
c992a4f6a9b0a3 James Hogan   2017-03-14  1550   */
c992a4f6a9b0a3 James Hogan   2017-03-14  1551  static int kvm_trap_vz_handle_cop_unusable(struct kvm_vcpu *vcpu)
c992a4f6a9b0a3 James Hogan   2017-03-14 @1552  {
c992a4f6a9b0a3 James Hogan   2017-03-14  1553  	u32 cause = vcpu->arch.host_cp0_cause;
c992a4f6a9b0a3 James Hogan   2017-03-14  1554  	enum emulation_result er = EMULATE_FAIL;
c992a4f6a9b0a3 James Hogan   2017-03-14  1555  	int ret = RESUME_GUEST;
c992a4f6a9b0a3 James Hogan   2017-03-14  1556  
c992a4f6a9b0a3 James Hogan   2017-03-14  1557  	if (((cause & CAUSEF_CE) >> CAUSEB_CE) == 1) {
c992a4f6a9b0a3 James Hogan   2017-03-14  1558  		/*
c992a4f6a9b0a3 James Hogan   2017-03-14  1559  		 * If guest FPU not present, the FPU operation should have been
c992a4f6a9b0a3 James Hogan   2017-03-14  1560  		 * treated as a reserved instruction!
c992a4f6a9b0a3 James Hogan   2017-03-14  1561  		 * If FPU already in use, we shouldn't get this at all.
c992a4f6a9b0a3 James Hogan   2017-03-14  1562  		 */
c992a4f6a9b0a3 James Hogan   2017-03-14  1563  		if (WARN_ON(!kvm_mips_guest_has_fpu(&vcpu->arch) ||
c992a4f6a9b0a3 James Hogan   2017-03-14  1564  			    vcpu->arch.aux_inuse & KVM_MIPS_AUX_FPU)) {
c992a4f6a9b0a3 James Hogan   2017-03-14  1565  			preempt_enable();
c992a4f6a9b0a3 James Hogan   2017-03-14  1566  			return EMULATE_FAIL;
c992a4f6a9b0a3 James Hogan   2017-03-14  1567  		}
c992a4f6a9b0a3 James Hogan   2017-03-14  1568  
c992a4f6a9b0a3 James Hogan   2017-03-14  1569  		kvm_own_fpu(vcpu);
c992a4f6a9b0a3 James Hogan   2017-03-14  1570  		er = EMULATE_DONE;
c992a4f6a9b0a3 James Hogan   2017-03-14  1571  	}
c992a4f6a9b0a3 James Hogan   2017-03-14  1572  	/* other coprocessors not handled */
c992a4f6a9b0a3 James Hogan   2017-03-14  1573  
c992a4f6a9b0a3 James Hogan   2017-03-14  1574  	switch (er) {
c992a4f6a9b0a3 James Hogan   2017-03-14  1575  	case EMULATE_DONE:
c992a4f6a9b0a3 James Hogan   2017-03-14  1576  		ret = RESUME_GUEST;
c992a4f6a9b0a3 James Hogan   2017-03-14  1577  		break;
c992a4f6a9b0a3 James Hogan   2017-03-14  1578  
c992a4f6a9b0a3 James Hogan   2017-03-14  1579  	case EMULATE_FAIL:
c34b26b98caca4 Tianjia Zhang 2020-06-23  1580  		vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
c992a4f6a9b0a3 James Hogan   2017-03-14  1581  		ret = RESUME_HOST;
c992a4f6a9b0a3 James Hogan   2017-03-14  1582  		break;
c992a4f6a9b0a3 James Hogan   2017-03-14  1583  
c992a4f6a9b0a3 James Hogan   2017-03-14  1584  	default:
c992a4f6a9b0a3 James Hogan   2017-03-14  1585  		BUG();
c992a4f6a9b0a3 James Hogan   2017-03-14  1586  	}
c992a4f6a9b0a3 James Hogan   2017-03-14  1587  	return ret;
c992a4f6a9b0a3 James Hogan   2017-03-14  1588  }
c992a4f6a9b0a3 James Hogan   2017-03-14  1589  

:::::: The code at line 1552 was first introduced by commit
:::::: c992a4f6a9b0a37c8bd7dfc727ecc3fed125c16b KVM: MIPS: Implement VZ support

:::::: TO: James Hogan <james.hogan@imgtec.com>
:::::: CC: James Hogan <james.hogan@imgtec.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25397 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-28 21:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 18:16 arch/mips/kvm/vz.c:1552: warning: expecting prototype for kvm_trap_vz_handle_cop_unusuable(). Prototype was for kvm_trap_vz_handle_cop_unusable() instead kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-01-28 21:03 kernel test robot
2021-12-09 21:04 kernel test robot
2021-09-06 13:46 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).