tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue head: 3f87cb8253c37f681944ab3a1f9a9d06fa0b0f41 commit: 6f6288ddb33a5438dca2a6fe10eec381688aa2b7 [102/138] KVM: x86/mmu: Use an rwlock for the x86 MMU config: x86_64-rhel-7.6-kselftests (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?id=6f6288ddb33a5438dca2a6fe10eec381688aa2b7 git remote add kvm https://git.kernel.org/pub/scm/virt/kvm/kvm.git git fetch --no-tags kvm queue git checkout 6f6288ddb33a5438dca2a6fe10eec381688aa2b7 # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): drivers/gpu/drm/i915/gvt/kvmgt.c: In function 'kvmgt_page_track_add': >> drivers/gpu/drm/i915/gvt/kvmgt.c:1706:12: error: passing argument 1 of 'spin_lock' from incompatible pointer type [-Werror=incompatible-pointer-types] 1706 | spin_lock(&kvm->mmu_lock); | ^~~~~~~~~~~~~~ | | | rwlock_t * {aka struct <anonymous> *} In file included from include/linux/wait.h:9, from include/linux/pid.h:6, from include/linux/sched.h:14, from include/linux/ratelimit.h:6, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from drivers/gpu/drm/i915/gvt/kvmgt.c:32: include/linux/spinlock.h:352:51: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'rwlock_t *' {aka 'struct <anonymous> *'} 352 | static __always_inline void spin_lock(spinlock_t *lock) | ~~~~~~~~~~~~^~~~ >> drivers/gpu/drm/i915/gvt/kvmgt.c:1715:14: error: passing argument 1 of 'spin_unlock' from incompatible pointer type [-Werror=incompatible-pointer-types] 1715 | spin_unlock(&kvm->mmu_lock); | ^~~~~~~~~~~~~~ | | | rwlock_t * {aka struct <anonymous> *} In file included from include/linux/wait.h:9, from include/linux/pid.h:6, from include/linux/sched.h:14, from include/linux/ratelimit.h:6, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from drivers/gpu/drm/i915/gvt/kvmgt.c:32: include/linux/spinlock.h:392:53: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'rwlock_t *' {aka 'struct <anonymous> *'} 392 | static __always_inline void spin_unlock(spinlock_t *lock) | ~~~~~~~~~~~~^~~~ drivers/gpu/drm/i915/gvt/kvmgt.c: In function 'kvmgt_page_track_remove': drivers/gpu/drm/i915/gvt/kvmgt.c:1740:12: error: passing argument 1 of 'spin_lock' from incompatible pointer type [-Werror=incompatible-pointer-types] 1740 | spin_lock(&kvm->mmu_lock); | ^~~~~~~~~~~~~~ | | | rwlock_t * {aka struct <anonymous> *} In file included from include/linux/wait.h:9, from include/linux/pid.h:6, from include/linux/sched.h:14, from include/linux/ratelimit.h:6, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from drivers/gpu/drm/i915/gvt/kvmgt.c:32: include/linux/spinlock.h:352:51: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'rwlock_t *' {aka 'struct <anonymous> *'} 352 | static __always_inline void spin_lock(spinlock_t *lock) | ~~~~~~~~~~~~^~~~ drivers/gpu/drm/i915/gvt/kvmgt.c:1749:14: error: passing argument 1 of 'spin_unlock' from incompatible pointer type [-Werror=incompatible-pointer-types] 1749 | spin_unlock(&kvm->mmu_lock); | ^~~~~~~~~~~~~~ | | | rwlock_t * {aka struct <anonymous> *} In file included from include/linux/wait.h:9, from include/linux/pid.h:6, from include/linux/sched.h:14, from include/linux/ratelimit.h:6, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from drivers/gpu/drm/i915/gvt/kvmgt.c:32: include/linux/spinlock.h:392:53: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'rwlock_t *' {aka 'struct <anonymous> *'} 392 | static __always_inline void spin_unlock(spinlock_t *lock) | ~~~~~~~~~~~~^~~~ drivers/gpu/drm/i915/gvt/kvmgt.c: In function 'kvmgt_page_track_flush_slot': drivers/gpu/drm/i915/gvt/kvmgt.c:1775:12: error: passing argument 1 of 'spin_lock' from incompatible pointer type [-Werror=incompatible-pointer-types] 1775 | spin_lock(&kvm->mmu_lock); | ^~~~~~~~~~~~~~ | | | rwlock_t * {aka struct <anonymous> *} In file included from include/linux/wait.h:9, from include/linux/pid.h:6, from include/linux/sched.h:14, from include/linux/ratelimit.h:6, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from drivers/gpu/drm/i915/gvt/kvmgt.c:32: include/linux/spinlock.h:352:51: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'rwlock_t *' {aka 'struct <anonymous> *'} 352 | static __always_inline void spin_lock(spinlock_t *lock) | ~~~~~~~~~~~~^~~~ drivers/gpu/drm/i915/gvt/kvmgt.c:1784:14: error: passing argument 1 of 'spin_unlock' from incompatible pointer type [-Werror=incompatible-pointer-types] 1784 | spin_unlock(&kvm->mmu_lock); | ^~~~~~~~~~~~~~ | | | rwlock_t * {aka struct <anonymous> *} In file included from include/linux/wait.h:9, from include/linux/pid.h:6, from include/linux/sched.h:14, from include/linux/ratelimit.h:6, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from drivers/gpu/drm/i915/gvt/kvmgt.c:32: include/linux/spinlock.h:392:53: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'rwlock_t *' {aka 'struct <anonymous> *'} 392 | static __always_inline void spin_unlock(spinlock_t *lock) | ~~~~~~~~~~~~^~~~ cc1: all warnings being treated as errors vim +/spin_lock +1706 drivers/gpu/drm/i915/gvt/kvmgt.c f30437c5e7bfa9 Jike Song 2016-11-09 1685 f66e5ff706038d Changbin Du 2018-01-30 1686 static int kvmgt_page_track_add(unsigned long handle, u64 gfn) f30437c5e7bfa9 Jike Song 2016-11-09 1687 { 659643f7d81432 Jike Song 2016-12-08 1688 struct kvmgt_guest_info *info; 659643f7d81432 Jike Song 2016-12-08 1689 struct kvm *kvm; f30437c5e7bfa9 Jike Song 2016-11-09 1690 struct kvm_memory_slot *slot; f30437c5e7bfa9 Jike Song 2016-11-09 1691 int idx; f30437c5e7bfa9 Jike Song 2016-11-09 1692 659643f7d81432 Jike Song 2016-12-08 1693 if (!handle_valid(handle)) 659643f7d81432 Jike Song 2016-12-08 1694 return -ESRCH; 659643f7d81432 Jike Song 2016-12-08 1695 659643f7d81432 Jike Song 2016-12-08 1696 info = (struct kvmgt_guest_info *)handle; 659643f7d81432 Jike Song 2016-12-08 1697 kvm = info->kvm; 659643f7d81432 Jike Song 2016-12-08 1698 f30437c5e7bfa9 Jike Song 2016-11-09 1699 idx = srcu_read_lock(&kvm->srcu); f30437c5e7bfa9 Jike Song 2016-11-09 1700 slot = gfn_to_memslot(kvm, gfn); faaaa53bdc6750 Jike Song 2016-12-16 1701 if (!slot) { faaaa53bdc6750 Jike Song 2016-12-16 1702 srcu_read_unlock(&kvm->srcu, idx); faaaa53bdc6750 Jike Song 2016-12-16 1703 return -EINVAL; faaaa53bdc6750 Jike Song 2016-12-16 1704 } f30437c5e7bfa9 Jike Song 2016-11-09 1705 f30437c5e7bfa9 Jike Song 2016-11-09 @1706 spin_lock(&kvm->mmu_lock); f30437c5e7bfa9 Jike Song 2016-11-09 1707 f30437c5e7bfa9 Jike Song 2016-11-09 1708 if (kvmgt_gfn_is_write_protected(info, gfn)) f30437c5e7bfa9 Jike Song 2016-11-09 1709 goto out; f30437c5e7bfa9 Jike Song 2016-11-09 1710 f30437c5e7bfa9 Jike Song 2016-11-09 1711 kvm_slot_page_track_add_page(kvm, slot, gfn, KVM_PAGE_TRACK_WRITE); f30437c5e7bfa9 Jike Song 2016-11-09 1712 kvmgt_protect_table_add(info, gfn); f30437c5e7bfa9 Jike Song 2016-11-09 1713 f30437c5e7bfa9 Jike Song 2016-11-09 1714 out: f30437c5e7bfa9 Jike Song 2016-11-09 @1715 spin_unlock(&kvm->mmu_lock); f30437c5e7bfa9 Jike Song 2016-11-09 1716 srcu_read_unlock(&kvm->srcu, idx); f30437c5e7bfa9 Jike Song 2016-11-09 1717 return 0; f30437c5e7bfa9 Jike Song 2016-11-09 1718 } f30437c5e7bfa9 Jike Song 2016-11-09 1719 :::::: The code at line 1706 was first introduced by commit :::::: f30437c5e7bfa9d8acc18058040efb4f474907c3 drm/i915/gvt: add KVMGT support :::::: TO: Jike Song <jike.song@xxxxxxxxx> :::::: CC: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip