Re: [PATCH 1/2] LoongArch: KVM: Add parameter exception code with exception handler

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

 



Hi Bibo,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 9d7a0577c9db35c4cc52db90bc415ea248446472]

url:    https://github.com/intel-lab-lkp/linux/commits/Bibo-Mao/LoongArch-KVM-Add-parameter-exception-code-with-exception-handler/20250424-144905
base:   9d7a0577c9db35c4cc52db90bc415ea248446472
patch link:    https://lore.kernel.org/r/20250424064625.3928278-2-maobibo%40loongson.cn
patch subject: [PATCH 1/2] LoongArch: KVM: Add parameter exception code with exception handler
config: loongarch-randconfig-001-20250425 (https://download.01.org/0day-ci/archive/20250425/202504251458.EJKsZMLH-lkp@xxxxxxxxx/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250425/202504251458.EJKsZMLH-lkp@xxxxxxxxx/reproduce)

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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504251458.EJKsZMLH-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> arch/loongarch/kvm/exit.c:734: warning: Function parameter or struct member 'ecode' not described in 'kvm_handle_fpu_disabled'


vim +734 arch/loongarch/kvm/exit.c

2737dee1067c2f Bibo Mao     2025-01-13  725  
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  726  /**
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  727   * kvm_handle_fpu_disabled() - Guest used fpu however it is disabled at host
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  728   * @vcpu:	Virtual CPU context.
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  729   *
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  730   * Handle when the guest attempts to use fpu which hasn't been allowed
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  731   * by the root context.
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  732   */
74303fac8d0580 Bibo Mao     2025-04-24  733  static int kvm_handle_fpu_disabled(struct kvm_vcpu *vcpu, int ecode)
37cdfc6dbf0416 Tianrui Zhao 2023-10-02 @734  {
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  735  	struct kvm_run *run = vcpu->run;
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  736  
db1ecca22edf27 Tianrui Zhao 2023-12-19  737  	if (!kvm_guest_has_fpu(&vcpu->arch)) {
db1ecca22edf27 Tianrui Zhao 2023-12-19  738  		kvm_queue_exception(vcpu, EXCCODE_INE, 0);
db1ecca22edf27 Tianrui Zhao 2023-12-19  739  		return RESUME_GUEST;
db1ecca22edf27 Tianrui Zhao 2023-12-19  740  	}
db1ecca22edf27 Tianrui Zhao 2023-12-19  741  
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  742  	/*
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  743  	 * If guest FPU not present, the FPU operation should have been
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  744  	 * treated as a reserved instruction!
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  745  	 * If FPU already in use, we shouldn't get this at all.
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  746  	 */
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  747  	if (WARN_ON(vcpu->arch.aux_inuse & KVM_LARCH_FPU)) {
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  748  		kvm_err("%s internal error\n", __func__);
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  749  		run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  750  		return RESUME_HOST;
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  751  	}
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  752  
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  753  	kvm_own_fpu(vcpu);
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  754  
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  755  	return RESUME_GUEST;
37cdfc6dbf0416 Tianrui Zhao 2023-10-02  756  }
71f4fb845874c3 Tianrui Zhao 2023-10-02  757  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[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