* [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 *'
@ 2025-04-02 4:23 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-04-02 4:23 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: llvm, oe-kbuild-all, kvm, Farrah Chen
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-02 4:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-02 4:23 [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 *' 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