Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Oliver Upton <oupton@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Marc Zyngier <maz@kernel.org>,
	"Wei-Lin Chang" <weilin.chang@arm.com>
Subject: [linux-next:master 3509/4300] arch/arm64/kvm/hyp/pgtable.c:1359:13: warning: implicit conversion from 'int' to 's8' (aka 'signed char') changes value from 2147483647 to -1
Date: Wed, 08 Jul 2026 07:02:21 +0800	[thread overview]
Message-ID: <202607080650.sMl0aR2a-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   5c73cd9f0819c1c44e373e3dabb68318b1de1a12
commit: 100baf0184896f859290a684f864b8200d8ac872 [3509/4300] KVM: arm64: Ensure level is always initialized when relaxing perms
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20260708/202607080650.sMl0aR2a-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 0a2fb2a2269da0e2a3e230beb6cad39ca314db33)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260708/202607080650.sMl0aR2a-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/202607080650.sMl0aR2a-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arch/arm64/kvm/hyp/pgtable.c:1359:13: warning: implicit conversion from 'int' to 's8' (aka 'signed char') changes value from 2147483647 to -1 [-Wconstant-conversion]
    1359 |         s8 level = TLBI_TTL_UNKNOWN;
         |            ~~~~~   ^~~~~~~~~~~~~~~~
   arch/arm64/include/asm/tlbflush.h:163:26: note: expanded from macro 'TLBI_TTL_UNKNOWN'
     163 | #define TLBI_TTL_UNKNOWN        INT_MAX
         |                                 ^~~~~~~
   include/vdso/limits.h:8:19: note: expanded from macro 'INT_MAX'
       8 | #define INT_MAX         ((int)(~0U >> 1))
         |                          ^~~~~~~~~~~~~~~
   1 warning generated.


vim +1359 arch/arm64/kvm/hyp/pgtable.c

  1354	
  1355	int kvm_pgtable_stage2_relax_perms(struct kvm_pgtable *pgt, u64 addr,
  1356					   enum kvm_pgtable_prot prot, enum kvm_pgtable_walk_flags flags)
  1357	{
  1358		kvm_pte_t xn = 0, set = 0, clr = 0;
> 1359		s8 level = TLBI_TTL_UNKNOWN;
  1360		int ret;
  1361	
  1362		if (prot & KVM_PTE_LEAF_ATTR_HI_SW)
  1363			return -EINVAL;
  1364	
  1365		if (prot & KVM_PGTABLE_PROT_R)
  1366			set |= KVM_PTE_LEAF_ATTR_LO_S2_S2AP_R;
  1367	
  1368		if (prot & KVM_PGTABLE_PROT_W)
  1369			set |= KVM_PTE_LEAF_ATTR_LO_S2_S2AP_W;
  1370	
  1371		ret = stage2_set_xn_attr(prot, &xn);
  1372		if (ret)
  1373			return ret;
  1374	
  1375		set |= xn & KVM_PTE_LEAF_ATTR_HI_S2_XN;
  1376		clr |= ~xn & KVM_PTE_LEAF_ATTR_HI_S2_XN;
  1377	
  1378		ret = stage2_update_leaf_attrs(pgt, addr, 1, set, clr, NULL, &level, flags);
  1379		if (!ret || ret == -EAGAIN)
  1380			kvm_call_hyp(__kvm_tlb_flush_vmid_ipa_nsh, pgt->mmu, addr, level);
  1381		return ret;
  1382	}
  1383	

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

                 reply	other threads:[~2026-07-07 23:03 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=202607080650.sMl0aR2a-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oupton@kernel.org \
    --cc=weilin.chang@arm.com \
    /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