[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
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
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/[email protected]/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/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ 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