public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kbuild-all@01.org, kbuild test robot <fengguang.wu@intel.com>,
	kvm@vger.kernel.org, Robert Hu <robert.hu@intel.com>,
	Farrah Chen <farrah.chen@intel.com>
Subject: Re: [kvm:queue 10/13] arch/x86/kvm/vmx.c:11312:11: note: in expansion of macro 'cmpxchg'
Date: Wed, 12 Jul 2017 14:32:33 +0200	[thread overview]
Message-ID: <20170712123232.GD28875@potion> (raw)
In-Reply-To: <201707120740.ojduFGW9%fengguang.wu@intel.com>

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

      reply	other threads:[~2017-07-12 12:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-11 23:40 [kvm:queue 10/13] arch/x86/kvm/vmx.c:11312:11: note: in expansion of macro 'cmpxchg' kbuild test robot
2017-07-12 12:32 ` Radim Krčmář [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170712123232.GD28875@potion \
    --to=rkrcmar@redhat.com \
    --cc=farrah.chen@intel.com \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=robert.hu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox