Re: [kvm:queue 10/13] arch/x86/kvm/vmx.c:11312:11: note: in expansion of macro 'cmpxchg'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paolo, I have removed these patches from kvm/queue.

32 bit cmpxchg doesn't support 64 bit operands, but I wonder why GCC
didn't complain before, because these patches just moved the line ...


2017-07-12 07:40+0800, kbuild test robot:
> tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
> head:   af2d88135e63f77ddf021a45b83acbe62d4feeb2
> commit: 78683bff7243622e9b7e3fa79c64af2ec5305f43 [10/13] KVM: VMX: extract __pi_post_block
> config: i386-allmodconfig (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
>         git checkout 78683bff7243622e9b7e3fa79c64af2ec5305f43
>         # save the attached .config to linux build tree
>         make ARCH=i386 
> 
> 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:11312:11: note: in expansion of macro 'cmpxchg'
>      } while (cmpxchg(&pi_desc->control, old.control,
>               ^~~~~~~
> 
> vim +/cmpxchg +11312 arch/x86/kvm/vmx.c
> 
>  11289	
>  11290	static void __pi_post_block(struct kvm_vcpu *vcpu)
>  11291	{
>  11292		struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
>  11293		struct pi_desc old, new;
>  11294		unsigned int dest;
>  11295		unsigned long flags;
>  11296	
>  11297		do {
>  11298			old.control = new.control = pi_desc->control;
>  11299	
>  11300			dest = cpu_physical_id(vcpu->cpu);
>  11301	
>  11302			if (x2apic_enabled())
>  11303				new.ndst = dest;
>  11304			else
>  11305				new.ndst = (dest << 8) & 0xFF00;
>  11306	
>  11307			/* Allow posting non-urgent interrupts */
>  11308			new.sn = 0;
>  11309	
>  11310			/* set 'NV' to 'notification vector' */
>  11311			new.nv = POSTED_INTR_VECTOR;
>  11312		} while (cmpxchg(&pi_desc->control, old.control,
>  11313				new.control) != old.control);
>  11314	
>  11315		if(vcpu->pre_pcpu != -1) {
>  11316			spin_lock_irqsave(
>  11317				&per_cpu(blocked_vcpu_on_cpu_lock,
>  11318				vcpu->pre_pcpu), flags);
>  11319			list_del(&vcpu->blocked_vcpu_list);
>  11320			spin_unlock_irqrestore(
>  11321				&per_cpu(blocked_vcpu_on_cpu_lock,
>  11322				vcpu->pre_pcpu), flags);
>  11323			vcpu->pre_pcpu = -1;
>  11324		}
>  11325	}
>  11326	
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux