On 27/09/2017 20:10, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue > head: 31afb2ea2b10a7d17ce3db4cdb0a12b63b2fe08a > commit: cd39e1176d320157831ce030b4c869bd2d5eb142 [3/5] KVM: VMX: extract __pi_post_block > config: i386-randconfig-x076-201739 (attached as .config) > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 > reproduce: > git checkout cd39e1176d320157831ce030b4c869bd2d5eb142 > # save the attached .config to linux build tree > make ARCH=i386 I posted a patch to fix this. Paolo > All warnings (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:11730:11: note: in expansion of macro 'cmpxchg' > } while (cmpxchg(&pi_desc->control, old.control, > ^~~~~~~ > -- > 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:11730:11: note: in expansion of macro 'cmpxchg' > } while (cmpxchg(&pi_desc->control, old.control, > ^~~~~~~ > > vim +/cmpxchg +11730 arch/x86/kvm/vmx.c > > 11707 > 11708 static void __pi_post_block(struct kvm_vcpu *vcpu) > 11709 { > 11710 struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); > 11711 struct pi_desc old, new; > 11712 unsigned int dest; > 11713 unsigned long flags; > 11714 > 11715 do { > 11716 old.control = new.control = pi_desc->control; > 11717 > 11718 dest = cpu_physical_id(vcpu->cpu); > 11719 > 11720 if (x2apic_enabled()) > 11721 new.ndst = dest; > 11722 else > 11723 new.ndst = (dest << 8) & 0xFF00; > 11724 > 11725 /* Allow posting non-urgent interrupts */ > 11726 new.sn = 0; > 11727 > 11728 /* set 'NV' to 'notification vector' */ > 11729 new.nv = POSTED_INTR_VECTOR; > 11730 } while (cmpxchg(&pi_desc->control, old.control, > 11731 new.control) != old.control); > 11732 > 11733 if(vcpu->pre_pcpu != -1) { > 11734 spin_lock_irqsave( > 11735 &per_cpu(blocked_vcpu_on_cpu_lock, > 11736 vcpu->pre_pcpu), flags); > 11737 list_del(&vcpu->blocked_vcpu_list); > 11738 spin_unlock_irqrestore( > 11739 &per_cpu(blocked_vcpu_on_cpu_lock, > 11740 vcpu->pre_pcpu), flags); > 11741 vcpu->pre_pcpu = -1; > 11742 } > 11743 } > 11744 > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation >