Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	David Woodhouse <dwmw@amazon.co.uk>
Subject: [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 *')
Date: Wed, 11 Nov 2026 08:43:13 +0800	[thread overview]
Message-ID: <202611110850.A1qi4Azm-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-11-11  0:43 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=202611110850.A1qi4Azm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dwmw@amazon.co.uk \
    --cc=joerg.roedel@amd.com \
    --cc=llvm@lists.linux.dev \
    --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