All of lore.kernel.org
 help / color / mirror / Atom feed
* [mark:arm64/kvm/fpsimd-fixes 8/11] arch/arm64/kvm/hyp/include/hyp/switch.h:380:15: warning: variable 'zcr_el2' set but not used
@ 2025-02-06  5:13 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-06  5:13 UTC (permalink / raw)
  To: Mark Rutland; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/kvm/fpsimd-fixes
head:   246fa113d11e53f51bf13b25bcf85161c2290b37
commit: 9b573af2d7bae55e446e8d422b6ec87a144d3148 [8/11] KVM: arm64: Eagerly switch ZCR_EL{1,2}
config: arm64-randconfig-003-20250206 (https://download.01.org/0day-ci/archive/20250206/202502061341.FvsCMKEH-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250206/202502061341.FvsCMKEH-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502061341.FvsCMKEH-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from arch/arm64/kvm/hyp/vhe/switch.c:7:
>> arch/arm64/kvm/hyp/include/hyp/switch.h:380:15: warning: variable 'zcr_el2' set but not used [-Wunused-but-set-variable]
           u64 zcr_el1, zcr_el2;
                        ^
   arch/arm64/kvm/hyp/include/hyp/switch.h:401:15: warning: variable 'zcr_el2' set but not used [-Wunused-but-set-variable]
           u64 zcr_el1, zcr_el2;
                        ^
   2 warnings generated.


vim +/zcr_el2 +380 arch/arm64/kvm/hyp/include/hyp/switch.h

   377	
   378	static inline void fpsimd_lazy_switch_to_guest(struct kvm_vcpu *vcpu)
   379	{
 > 380		u64 zcr_el1, zcr_el2;
   381	
   382		if (!guest_owns_fp_regs())
   383			return;
   384	
   385		if (vcpu_has_sve(vcpu)) {
   386			/* A guest hypervisor may restrict the effective max VL. */
   387			if (vcpu_has_nv(vcpu) && !is_hyp_ctxt(vcpu))
   388				zcr_el2 = __vcpu_sys_reg(vcpu, ZCR_EL2);
   389			else
   390				zcr_el2 = vcpu_sve_max_vq(vcpu) - 1;
   391	
   392			sve_cond_update_zcr_vq(zcr_el2, SYS_ZCR_EL2);
   393	
   394			zcr_el1 = __vcpu_sys_reg(vcpu, vcpu_sve_zcr_elx(vcpu));
   395			write_sysreg_el1(zcr_el1, SYS_ZCR);
   396		}
   397	}
   398	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-06  5:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06  5:13 [mark:arm64/kvm/fpsimd-fixes 8/11] arch/arm64/kvm/hyp/include/hyp/switch.h:380:15: warning: variable 'zcr_el2' set but not used kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.