* [arm-platforms:kvm-arm64/nv3 19/19] arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h:207:2: warning: variable '__val' is uninitialized when used within its own initialization
@ 2026-09-02 1:46 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-02 1:46 UTC (permalink / raw)
To: Marc Zyngier; +Cc: llvm, oe-kbuild-all, linux-arm-kernel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/nv3
head: ae6cf96796e7f11ecba10429d64400e708687cdf
commit: ae6cf96796e7f11ecba10429d64400e708687cdf [19/19] KVM: arm64: Avoid writing to MDSCR_EL1 unless necessary
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20260902/202609020944.8Ffx8eaS-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 678058af7da6a20593d8bb23076dc4773f9e55f1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260902/202609020944.8Ffx8eaS-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/202609020944.8Ffx8eaS-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/arm64/kvm/hyp/vhe/sysreg-sr.c:7:
>> arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h:207:2: warning: variable '__val' is uninitialized when used within its own initialization [-Wuninitialized]
207 | sysreg_cond_write(*ctxt_mdscr_el1(ctxt), mdscr_el1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/include/asm/sysreg.h:1222:16: note: expanded from macro 'sysreg_cond_write'
1222 | write_sysreg(__val, sysreg); \
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~
arch/arm64/include/asm/sysreg.h:1179:20: note: expanded from macro 'write_sysreg'
1179 | u64 __val = (u64)(v); \
| ~~~~~ ^
1 warning generated.
vim +/__val +207 arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h
199
200 static inline void __sysreg_restore_common_state(struct kvm_cpu_context *ctxt)
201 {
202 /*
203 * KVM NV traps writes to MDSCR_EL1, as the access is
204 * otherwise written to memory, with no effects. Avoid the
205 * high trap cost by only writing if the value has changed.
206 */
> 207 sysreg_cond_write(*ctxt_mdscr_el1(ctxt), mdscr_el1);
208
209 // POR_EL0 can affect uaccess, so must be saved/restored early.
210 if (ctxt_has_s1poe(ctxt))
211 write_sysreg_s(ctxt_sys_reg(ctxt, POR_EL0), SYS_POR_EL0);
212 }
213
--
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:[~2026-09-02 1:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 1:46 [arm-platforms:kvm-arm64/nv3 19/19] arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h:207:2: warning: variable '__val' is uninitialized when used within its own initialization 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