Re: [PATCH v2 20/28] KVM: x86/mmu: Use atomic ops to set SPTEs in TDP MMU map
From: kernel test robot
Date: Tue Feb 02 2021 - 21:49:45 EST
Hi Ben,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/master]
[also build test ERROR on linux/master linus/master v5.11-rc6 next-20210125]
[cannot apply to kvm/linux-next tip/sched/core]
[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/Ben-Gardon/Allow-parallel-MMU-operations-with-TDP-MMU/20210203-032259
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git a7e0bdf1b07ea6169930ec42b0bdb17e1c1e3bb0
config: i386-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/54f2f26ad4d34bc74287a904d2eebc011974147c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ben-Gardon/Allow-parallel-MMU-operations-with-TDP-MMU/20210203-032259
git checkout 54f2f26ad4d34bc74287a904d2eebc011974147c
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/atomic.h:8,
from include/linux/atomic.h:7,
from include/linux/cpumask.h:13,
from arch/x86/include/asm/cpumask.h:5,
from arch/x86/include/asm/msr.h:11,
from arch/x86/include/asm/processor.h:22,
from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:56,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/percpu.h:6,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/mmu.h:5,
from arch/x86/kvm/mmu/tdp_mmu.c:3:
In function 'handle_removed_tdp_mmu_page',
inlined from '__handle_changed_spte' at arch/x86/kvm/mmu/tdp_mmu.c:454:3:
>> arch/x86/include/asm/cmpxchg.h:67:4: error: call to '__xchg_wrong_size' declared with attribute error: Bad argument size for xchg
67 | __ ## op ## _wrong_size(); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/cmpxchg.h:78:27: note: in expansion of macro '__xchg_op'
78 | #define arch_xchg(ptr, v) __xchg_op((ptr), (v), xchg, "")
| ^~~~~~~~~
include/asm-generic/atomic-instrumented.h:1649:2: note: in expansion of macro 'arch_xchg'
1649 | arch_xchg(__ai_ptr, __VA_ARGS__); \
| ^~~~~~~~~
arch/x86/kvm/mmu/tdp_mmu.c:350:21: note: in expansion of macro 'xchg'
350 | old_child_spte = xchg(sptep, 0);
| ^~~~
vim +/__xchg_wrong_size +67 arch/x86/include/asm/cmpxchg.h
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 37
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 38 /*
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 39 * An exchange-type operation, which takes a value and a pointer, and
7f5281ae8a8e7f Li Zhong 2013-04-25 40 * returns the old value.
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 41 */
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 42 #define __xchg_op(ptr, arg, op, lock) \
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 43 ({ \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 44 __typeof__ (*(ptr)) __ret = (arg); \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 45 switch (sizeof(*(ptr))) { \
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 46 case __X86_CASE_B: \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 47 asm volatile (lock #op "b %b0, %1\n" \
2ca052a3710fac Jeremy Fitzhardinge 2012-04-02 48 : "+q" (__ret), "+m" (*(ptr)) \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 49 : : "memory", "cc"); \
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 50 break; \
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 51 case __X86_CASE_W: \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 52 asm volatile (lock #op "w %w0, %1\n" \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 53 : "+r" (__ret), "+m" (*(ptr)) \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 54 : : "memory", "cc"); \
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 55 break; \
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 56 case __X86_CASE_L: \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 57 asm volatile (lock #op "l %0, %1\n" \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 58 : "+r" (__ret), "+m" (*(ptr)) \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 59 : : "memory", "cc"); \
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 60 break; \
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 61 case __X86_CASE_Q: \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 62 asm volatile (lock #op "q %q0, %1\n" \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 63 : "+r" (__ret), "+m" (*(ptr)) \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 64 : : "memory", "cc"); \
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 65 break; \
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 66 default: \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 @67 __ ## op ## _wrong_size(); \
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 68 } \
31a8394e069e47 Jeremy Fitzhardinge 2011-09-30 69 __ret; \
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 70 })
e9826380d83d1b Jeremy Fitzhardinge 2011-08-18 71
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip