tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue head: af2d88135e63f77ddf021a45b83acbe62d4feeb2 commit: 5914de4f07a970e336dab21f702c9efe3145be85 [11/13] KVM: VMX: avoid double list add with VT-d posted interrupts config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: git checkout 5914de4f07a970e336dab21f702c9efe3145be85 # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): In file included from arch/x86/include/asm/atomic.h:7:0, from include/linux/atomic.h:4, from include/linux/mm_types_task.h:12, from include/linux/mm_types.h:4, from arch/x86/kvm/irq.h:25, from arch/x86/kvm/vmx.c:19: arch/x86/kvm/vmx.c: In function '__pi_post_block': arch/x86/include/asm/cmpxchg.h:129:2: warning: '__ret' is used uninitialized in this function [-Wuninitialized] __ret; \ ^~~~~ arch/x86/include/asm/cmpxchg.h:86:21: note: '__ret' was declared here __typeof__(*(ptr)) __ret; \ ^ arch/x86/include/asm/cmpxchg.h:133:2: note: in expansion of macro '__raw_cmpxchg' __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX) ^~~~~~~~~~~~~ arch/x86/include/asm/cmpxchg.h:148:2: note: in expansion of macro '__cmpxchg' __cmpxchg(ptr, old, new, sizeof(*(ptr))) ^~~~~~~~~ arch/x86/kvm/vmx.c:11313:11: note: in expansion of macro 'cmpxchg' } while (cmpxchg(&pi_desc->control, old.control, ^~~~~~~ In function '__pi_post_block', inlined from 'pi_post_block' at arch/x86/kvm/vmx.c:11412:2, inlined from 'vmx_post_block' at arch/x86/kvm/vmx.c:11421:2: >> arch/x86/include/asm/cmpxchg.h:127:3: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg __cmpxchg_wrong_size(); \ ^~~~~~~~~~~~~~~~~~~~~~ arch/x86/include/asm/cmpxchg.h:133:2: note: in expansion of macro '__raw_cmpxchg' __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX) ^~~~~~~~~~~~~ arch/x86/include/asm/cmpxchg.h:148:2: note: in expansion of macro '__cmpxchg' __cmpxchg(ptr, old, new, sizeof(*(ptr))) ^~~~~~~~~ arch/x86/kvm/vmx.c:11313:11: note: in expansion of macro 'cmpxchg' } while (cmpxchg(&pi_desc->control, old.control, ^~~~~~~ vim +/__cmpxchg_wrong_size +127 arch/x86/include/asm/cmpxchg.h e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 78 e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 79 /* e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 80 * Atomic compare and exchange. Compare OLD with MEM, if identical, e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 81 * store NEW in MEM. Return the initial value in MEM. Success is e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 82 * indicated by comparing RETURN with OLD. e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 83 */ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 84 #define __raw_cmpxchg(ptr, old, new, size, lock) \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 85 ({ \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 86 __typeof__(*(ptr)) __ret; \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 87 __typeof__(*(ptr)) __old = (old); \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 88 __typeof__(*(ptr)) __new = (new); \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 89 switch (size) { \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 90 case __X86_CASE_B: \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 91 { \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 92 volatile u8 *__ptr = (volatile u8 *)(ptr); \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 93 asm volatile(lock "cmpxchgb %2,%1" \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 94 : "=a" (__ret), "+m" (*__ptr) \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 95 : "q" (__new), "0" (__old) \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 96 : "memory"); \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 97 break; \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 98 } \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 99 case __X86_CASE_W: \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 100 { \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 101 volatile u16 *__ptr = (volatile u16 *)(ptr); \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 102 asm volatile(lock "cmpxchgw %2,%1" \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 103 : "=a" (__ret), "+m" (*__ptr) \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 104 : "r" (__new), "0" (__old) \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 105 : "memory"); \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 106 break; \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 107 } \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 108 case __X86_CASE_L: \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 109 { \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 110 volatile u32 *__ptr = (volatile u32 *)(ptr); \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 111 asm volatile(lock "cmpxchgl %2,%1" \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 112 : "=a" (__ret), "+m" (*__ptr) \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 113 : "r" (__new), "0" (__old) \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 114 : "memory"); \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 115 break; \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 116 } \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 117 case __X86_CASE_Q: \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 118 { \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 119 volatile u64 *__ptr = (volatile u64 *)(ptr); \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 120 asm volatile(lock "cmpxchgq %2,%1" \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 121 : "=a" (__ret), "+m" (*__ptr) \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 122 : "r" (__new), "0" (__old) \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 123 : "memory"); \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 124 break; \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 125 } \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 126 default: \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 @127 __cmpxchg_wrong_size(); \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 128 } \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 129 __ret; \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 130 }) e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 131 e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 132 #define __cmpxchg(ptr, old, new, size) \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 133 __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX) e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 134 e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 135 #define __sync_cmpxchg(ptr, old, new, size) \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 136 __raw_cmpxchg((ptr), (old), (new), (size), "lock; ") e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 137 e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 138 #define __cmpxchg_local(ptr, old, new, size) \ e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 139 __raw_cmpxchg((ptr), (old), (new), (size), "") e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 140 96a388de include/asm-x86/cmpxchg.h Thomas Gleixner 2007-10-11 141 #ifdef CONFIG_X86_32 a1ce3928 arch/x86/include/asm/cmpxchg.h David Howells 2012-10-02 142 # include <asm/cmpxchg_32.h> 96a388de include/asm-x86/cmpxchg.h Thomas Gleixner 2007-10-11 143 #else a1ce3928 arch/x86/include/asm/cmpxchg.h David Howells 2012-10-02 144 # include <asm/cmpxchg_64.h> 96a388de include/asm-x86/cmpxchg.h Thomas Gleixner 2007-10-11 145 #endif e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 146 e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 147 #define cmpxchg(ptr, old, new) \ fc395b92 arch/x86/include/asm/cmpxchg.h Jan Beulich 2012-01-26 @148 __cmpxchg(ptr, old, new, sizeof(*(ptr))) e9826380 arch/x86/include/asm/cmpxchg.h Jeremy Fitzhardinge 2011-08-18 149 :::::: The code at line 127 was first introduced by commit :::::: e9826380d83d1bda3ee5663bf3fa4667a6fbe60a x86, cmpxchg: Unify cmpxchg into cmpxchg.h :::::: TO: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx> :::::: CC: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip