From: kernel test robot <lkp@intel.com>
To: Marc Zyngier <maz@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-arm-kernel@lists.infradead.org
Subject: [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
Date: Wed, 02 Sep 2026 09:46:43 +0800 [thread overview]
Message-ID: <202609020944.8Ffx8eaS-lkp@intel.com> (raw)
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
reply other threads:[~2026-09-02 1:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202609020944.8Ffx8eaS-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox