Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [dwmw2:vsm2/vsm-min 14/123] arch/riscv/kvm/vcpu_vector.c:102:19: error: incompatible pointer types initializing 'struct kvm_vcpu *' with an expression of type 'typeof_unqual (*(kvm_get_running_vcpus()))' (aka 'struct kvm_vcpu_common *')
@ 2026-11-11  0:43 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-11  0:43 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: llvm, oe-kbuild-all, David Woodhouse

tree:   git://git.infradead.org/users/dwmw2/linux vsm2/vsm-min
head:   73f14216b586db8fb3211410b88fbcdff5a96c0a
commit: 75bb49aa924fb9151f7e1fe441ff0eafbc996dae [14/123] kvm: Make kvm_running_vcpus point to struct kvm_vcpu_common
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20261111/202611110850.A1qi4Azm-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project e73e336290028f26553b46c9fba844c13da38c9c)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261111/202611110850.A1qi4Azm-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/202611110850.A1qi4Azm-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/riscv/kvm/vcpu_vector.c:102:19: error: incompatible pointer types initializing 'struct kvm_vcpu *' with an expression of type 'typeof_unqual (*(kvm_get_running_vcpus()))' (aka 'struct kvm_vcpu_common *') [-Wincompatible-pointer-types]
     102 |         struct kvm_vcpu *vcpu = *this_cpu_ptr(kvm_get_running_vcpus());
         |                          ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +102 arch/riscv/kvm/vcpu_vector.c

b5060a4aa33d7d Andy Chiu 2026-08-03   99  
b5060a4aa33d7d Andy Chiu 2026-08-03  100  void kvm_riscv_vcpu_flush_vector(void)
b5060a4aa33d7d Andy Chiu 2026-08-03  101  {
b5060a4aa33d7d Andy Chiu 2026-08-03 @102  	struct kvm_vcpu *vcpu = *this_cpu_ptr(kvm_get_running_vcpus());
b5060a4aa33d7d Andy Chiu 2026-08-03  103  
b5060a4aa33d7d Andy Chiu 2026-08-03  104  	/*
b5060a4aa33d7d Andy Chiu 2026-08-03  105  	 * Only reached from __riscv_flush_vector_context() when RISCV_V_VCPU_CTX is set, which
b5060a4aa33d7d Andy Chiu 2026-08-03  106  	 * always have kvm_get_running_vcpus non-NULL.
b5060a4aa33d7d Andy Chiu 2026-08-03  107  	 */
b5060a4aa33d7d Andy Chiu 2026-08-03  108  	if (WARN_ON_ONCE(!vcpu))
b5060a4aa33d7d Andy Chiu 2026-08-03  109  		return;
b5060a4aa33d7d Andy Chiu 2026-08-03  110  
b5060a4aa33d7d Andy Chiu 2026-08-03  111  	kvm_riscv_vcpu_guest_vector_save(&vcpu->arch.guest_context, vcpu->arch.isa);
b5060a4aa33d7d Andy Chiu 2026-08-03  112  
b5060a4aa33d7d Andy Chiu 2026-08-03  113  	if ((vcpu->arch.guest_context.sstatus & SR_VS) != SR_VS_OFF)
b5060a4aa33d7d Andy Chiu 2026-08-03  114  		riscv_v_flags_set(riscv_v_flags() | RISCV_V_VCPU_NEED_RESTORE);
b5060a4aa33d7d Andy Chiu 2026-08-03  115  }
b5060a4aa33d7d Andy Chiu 2026-08-03  116  

:::::: The code at line 102 was first introduced by commit
:::::: b5060a4aa33d7d78a8c1837ab08ef0c81ea96650 RISC-V: KVM: fix vcpu vector context handling for kernel-mode vector

:::::: TO: Andy Chiu <tchiu@tenstorrent.com>
:::::: CC: Anup Patel <anup@brainfault.org>

--
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-11-11  0:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11  0:43 [dwmw2:vsm2/vsm-min 14/123] arch/riscv/kvm/vcpu_vector.c:102:19: error: incompatible pointer types initializing 'struct kvm_vcpu *' with an expression of type 'typeof_unqual (*(kvm_get_running_vcpus()))' (aka 'struct kvm_vcpu_common *') 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