arch/arm64/kvm/nested.c:227:21: sparse: sparse: incorrect type in assignment (different base types)
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 92fd6e84175befa1775e5c0ab682938eca27c0b2 commit: 39db933ba67f89b95dc7c7c11cfd63c323c59af9 [11304/11746] KVM: arm64: nv: Implement HW access flag management in stage-2 SW PTW config: arm64-randconfig-r133-20251125 (https://download.01.org/0day-ci/archive/20251126/[email protected]/config) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9e9fe08b16ea2c4d9867fb4974edf2a3776d6ece) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251126/[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]/
sparse warnings: (new ones prefixed by >>)
>> arch/arm64/kvm/nested.c:227:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] old @@ got restricted __be64 [usertype] @@ arch/arm64/kvm/nested.c:227:21: sparse: expected unsigned long long [usertype] old arch/arm64/kvm/nested.c:227:21: sparse: got restricted __be64 [usertype] >> arch/arm64/kvm/nested.c:228:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] new @@ got restricted __be64 [usertype] @@ arch/arm64/kvm/nested.c:228:21: sparse: expected unsigned long long [usertype] new arch/arm64/kvm/nested.c:228:21: sparse: got restricted __be64 [usertype] >> arch/arm64/kvm/nested.c:230:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] old @@ got restricted __le64 [usertype] @@ arch/arm64/kvm/nested.c:230:21: sparse: expected unsigned long long [usertype] old arch/arm64/kvm/nested.c:230:21: sparse: got restricted __le64 [usertype] >> arch/arm64/kvm/nested.c:231:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] new @@ got restricted __le64 [usertype] @@
arch/arm64/kvm/nested.c:231:21: sparse: expected unsigned long long [usertype] new
arch/arm64/kvm/nested.c:231:21: sparse: got restricted __le64 [usertype]
arch/arm64/kvm/nested.c: note: in included file (through include/linux/sched.h, include/linux/resume_user_mode.h, include/linux/entry-virt.h, ...):
include/linux/spinlock.h:606:1: sparse: sparse: context imbalance in 'kvm_handle_s1e2_tlbi' - wrong count at exit arch/arm64/kvm/nested.c:1219:12: sparse: sparse: context imbalance in 'kvm_translate_vncr' - wrong count at exit arch/arm64/kvm/nested.c:1416:13: sparse: sparse: context imbalance in 'kvm_map_l1_vncr' - wrong count at exit
vim +227 arch/arm64/kvm/nested.c
222
223 static int swap_guest_s2_desc(struct kvm_vcpu *vcpu, phys_addr_t pa, u64 old, u64 new,
224 struct s2_walk_info *wi)
225 {
226 if (wi->be) {
> 227 old = cpu_to_be64(old);
> 228 new = cpu_to_be64(new);
229 } else {
> 230 old = cpu_to_le64(old);
> 231 new = cpu_to_le64(new); 232 }
233
234 return __kvm_at_swap_desc(vcpu->kvm, pa, old, new);
235 }
236
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki