[Intel-gfx] [FYI PATCH] i915: kvmgt: the KVM mmu_lock is now an rwlock
kernel test robot
lkp at intel.com
Tue Feb 9 07:56:51 UTC 2021
Hi Paolo,
I love your patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on linux/master drm-tip/drm-tip linus/master v5.11-rc6 next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Paolo-Bonzini/i915-kvmgt-the-KVM-mmu_lock-is-now-an-rwlock/20210209-070812
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/e1625dbf5fa4aea9c53da01a04bfb55443375c30
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Paolo-Bonzini/i915-kvmgt-the-KVM-mmu_lock-is-now-an-rwlock/20210209-070812
git checkout e1625dbf5fa4aea9c53da01a04bfb55443375c30
# 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 at intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/spinlock.h:312,
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:
drivers/gpu/drm/i915/gvt/kvmgt.c: In function 'kvmgt_page_track_add':
>> drivers/gpu/drm/i915/gvt/kvmgt.c:1706:13: error: passing argument 1 of '_raw_write_lock' from incompatible pointer type [-Werror=incompatible-pointer-types]
1706 | write_lock(&kvm->mmu_lock);
| ^~~~~~~~~~~~~~
| |
| spinlock_t * {aka struct spinlock *}
include/linux/rwlock.h:70:42: note: in definition of macro 'write_lock'
70 | #define write_lock(lock) _raw_write_lock(lock)
| ^~~~
In file included from include/linux/spinlock_api_smp.h:190,
from include/linux/spinlock.h:318,
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/rwlock_api_smp.h:19:43: note: expected 'rwlock_t *' {aka 'struct <anonymous> *'} but argument is of type 'spinlock_t *' {aka 'struct spinlock *'}
19 | void __lockfunc _raw_write_lock(rwlock_t *lock) __acquires(lock);
| ~~~~~~~~~~^~~~
In file included from include/linux/spinlock.h:312,
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:
>> drivers/gpu/drm/i915/gvt/kvmgt.c:1715:15: error: passing argument 1 of '_raw_write_unlock' from incompatible pointer type [-Werror=incompatible-pointer-types]
1715 | write_unlock(&kvm->mmu_lock);
| ^~~~~~~~~~~~~~
| |
| spinlock_t * {aka struct spinlock *}
include/linux/rwlock.h:106:47: note: in definition of macro 'write_unlock'
106 | #define write_unlock(lock) _raw_write_unlock(lock)
| ^~~~
In file included from include/linux/spinlock_api_smp.h:190,
from include/linux/spinlock.h:318,
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/rwlock_api_smp.h:31:45: note: expected 'rwlock_t *' {aka 'struct <anonymous> *'} but argument is of type 'spinlock_t *' {aka 'struct spinlock *'}
31 | void __lockfunc _raw_write_unlock(rwlock_t *lock) __releases(lock);
| ~~~~~~~~~~^~~~
In file included from include/linux/spinlock.h:312,
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:
drivers/gpu/drm/i915/gvt/kvmgt.c: In function 'kvmgt_page_track_remove':
drivers/gpu/drm/i915/gvt/kvmgt.c:1740:13: error: passing argument 1 of '_raw_write_lock' from incompatible pointer type [-Werror=incompatible-pointer-types]
1740 | write_lock(&kvm->mmu_lock);
| ^~~~~~~~~~~~~~
| |
| spinlock_t * {aka struct spinlock *}
include/linux/rwlock.h:70:42: note: in definition of macro 'write_lock'
70 | #define write_lock(lock) _raw_write_lock(lock)
| ^~~~
In file included from include/linux/spinlock_api_smp.h:190,
from include/linux/spinlock.h:318,
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/rwlock_api_smp.h:19:43: note: expected 'rwlock_t *' {aka 'struct <anonymous> *'} but argument is of type 'spinlock_t *' {aka 'struct spinlock *'}
19 | void __lockfunc _raw_write_lock(rwlock_t *lock) __acquires(lock);
| ~~~~~~~~~~^~~~
In file included from include/linux/spinlock.h:312,
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:
drivers/gpu/drm/i915/gvt/kvmgt.c:1749:15: error: passing argument 1 of '_raw_write_unlock' from incompatible pointer type [-Werror=incompatible-pointer-types]
1749 | write_unlock(&kvm->mmu_lock);
| ^~~~~~~~~~~~~~
| |
| spinlock_t * {aka struct spinlock *}
include/linux/rwlock.h:106:47: note: in definition of macro 'write_unlock'
106 | #define write_unlock(lock) _raw_write_unlock(lock)
| ^~~~
In file included from include/linux/spinlock_api_smp.h:190,
from include/linux/spinlock.h:318,
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/rwlock_api_smp.h:31:45: note: expected 'rwlock_t *' {aka 'struct <anonymous> *'} but argument is of type 'spinlock_t *' {aka 'struct spinlock *'}
31 | void __lockfunc _raw_write_unlock(rwlock_t *lock) __releases(lock);
| ~~~~~~~~~~^~~~
In file included from include/linux/spinlock.h:312,
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:
drivers/gpu/drm/i915/gvt/kvmgt.c: In function 'kvmgt_page_track_flush_slot':
drivers/gpu/drm/i915/gvt/kvmgt.c:1775:13: error: passing argument 1 of '_raw_write_lock' from incompatible pointer type [-Werror=incompatible-pointer-types]
1775 | write_lock(&kvm->mmu_lock);
| ^~~~~~~~~~~~~~
| |
| spinlock_t * {aka struct spinlock *}
include/linux/rwlock.h:70:42: note: in definition of macro 'write_lock'
70 | #define write_lock(lock) _raw_write_lock(lock)
| ^~~~
In file included from include/linux/spinlock_api_smp.h:190,
from include/linux/spinlock.h:318,
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,
vim +/_raw_write_lock +1706 drivers/gpu/drm/i915/gvt/kvmgt.c
1685
1686 static int kvmgt_page_track_add(unsigned long handle, u64 gfn)
1687 {
1688 struct kvmgt_guest_info *info;
1689 struct kvm *kvm;
1690 struct kvm_memory_slot *slot;
1691 int idx;
1692
1693 if (!handle_valid(handle))
1694 return -ESRCH;
1695
1696 info = (struct kvmgt_guest_info *)handle;
1697 kvm = info->kvm;
1698
1699 idx = srcu_read_lock(&kvm->srcu);
1700 slot = gfn_to_memslot(kvm, gfn);
1701 if (!slot) {
1702 srcu_read_unlock(&kvm->srcu, idx);
1703 return -EINVAL;
1704 }
1705
> 1706 write_lock(&kvm->mmu_lock);
1707
1708 if (kvmgt_gfn_is_write_protected(info, gfn))
1709 goto out;
1710
1711 kvm_slot_page_track_add_page(kvm, slot, gfn, KVM_PAGE_TRACK_WRITE);
1712 kvmgt_protect_table_add(info, gfn);
1713
1714 out:
> 1715 write_unlock(&kvm->mmu_lock);
1716 srcu_read_unlock(&kvm->srcu, idx);
1717 return 0;
1718 }
1719
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 64609 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20210209/04b5e489/attachment-0001.gz>
More information about the Intel-gfx
mailing list