public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	kvm@vger.kernel.org, Farrah Chen <farrah.chen@intel.com>
Subject: [kvm:planes-20250401 58/62] arch/x86/kvm/lapic.c:1327:37: error: incompatible pointer types passing 'atomic_t *' to parameter of type 'volatile unsigned long *'
Date: Wed, 2 Apr 2025 12:23:16 +0800	[thread overview]
Message-ID: <202504021219.U3GWMel8-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git planes-20250401
head:   73685d9c23b7122b44f07d59244416f8b56ed48e
commit: 08db55297a7b060909a0121cb4ce6abbc3e6b2ea [58/62] KVM: x86: handle interrupt priorities for planes
config: i386-buildonly-randconfig-006-20250402 (https://download.01.org/0day-ci/archive/20250402/202504021219.U3GWMel8-lkp@intel.com/config)
compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250402/202504021219.U3GWMel8-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/202504021219.U3GWMel8-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/kvm/lapic.c:1327:37: error: incompatible pointer types passing 'atomic_t *' to parameter of type 'volatile unsigned long *' [-Werror,-Wincompatible-pointer-types]
    1327 |         if (!test_and_set_bit(vcpu->plane, &plane0_vcpu->arch.irr_pending_planes)) {
         |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bitops/instrumented-atomic.h:68:79: note: passing argument to parameter 'addr' here
      68 | static __always_inline bool test_and_set_bit(long nr, volatile unsigned long *addr)
         |                                                                               ^
   1 error generated.
--
>> arch/x86/kvm/x86.c:11745:23: error: incompatible pointer types passing 'atomic_t *' to parameter of type 'volatile unsigned long *' [-Werror,-Wincompatible-pointer-types]
    11745 |                 clear_bit(plane_id, &plane0_vcpu->arch.irr_pending_planes);
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bitops/instrumented-atomic.h:39:72: note: passing argument to parameter 'addr' here
      39 | static __always_inline void clear_bit(long nr, volatile unsigned long *addr)
         |                                                                        ^
   1 error generated.


vim +1327 arch/x86/kvm/lapic.c

  1313	
  1314	static void kvm_lapic_deliver_interrupt(struct kvm_vcpu *vcpu, struct kvm_lapic *apic,
  1315						int delivery_mode, int trig_mode, int vector)
  1316	{
  1317		struct kvm_vcpu *plane0_vcpu = vcpu->plane0;
  1318		struct kvm_plane *running_plane;
  1319		u16 req_exit_planes;
  1320	
  1321		kvm_x86_call(deliver_interrupt)(apic, delivery_mode, trig_mode, vector);
  1322	
  1323		/*
  1324		 * test_and_set_bit implies a memory barrier, so IRR is written before
  1325		 * reading irr_pending_planes below...
  1326		 */
> 1327		if (!test_and_set_bit(vcpu->plane, &plane0_vcpu->arch.irr_pending_planes)) {
  1328			/*
  1329			 * ... and also running_plane and req_exit_planes are read after writing
  1330			 * irr_pending_planes.  Both barriers pair with kvm_arch_vcpu_ioctl_run().
  1331			 */
  1332			smp_mb__after_atomic();
  1333	
  1334			running_plane = READ_ONCE(plane0_vcpu->running_plane);
  1335			if (!running_plane)
  1336				return;
  1337	
  1338			req_exit_planes = READ_ONCE(plane0_vcpu->req_exit_planes);
  1339			if (!(req_exit_planes & BIT(vcpu->plane)))
  1340				return;
  1341	
  1342			kvm_make_request(KVM_REQ_PLANE_INTERRUPT,
  1343					 kvm_get_plane_vcpu(running_plane, vcpu->vcpu_id));
  1344		}
  1345	}
  1346	

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

                 reply	other threads:[~2025-04-02  4:23 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=202504021219.U3GWMel8-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=farrah.chen@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pbonzini@redhat.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