public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
	kvm@vger.kernel.org, Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>,
	Marcelo Bandeira Condotta <mcondotta@redhat.com>,
	Makarand Sonare <makarandsonare@google.com>,
	Peter Xu <peterx@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] KVM: selftests: fix vmx_preemption_timer_test build with GCC10
Date: Mon, 8 Jun 2020 07:38:59 -0700	[thread overview]
Message-ID: <20200608143859.GA8223@linux.intel.com> (raw)
In-Reply-To: <39c73030-49ff-f25c-74de-9a52579eefbe@redhat.com>

On Mon, Jun 08, 2020 at 01:57:03PM +0200, Paolo Bonzini wrote:
> On 08/06/20 13:23, Vitaly Kuznetsov wrote:
> > GCC10 fails to build vmx_preemption_timer_test:
> > 
> > gcc -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99
> > -fno-stack-protector -fno-PIE -I../../../../tools/include
> >  -I../../../../tools/arch/x86/include -I../../../../usr/include/
> >  -Iinclude -Ix86_64 -Iinclude/x86_64 -I..  -pthread  -no-pie
> >  x86_64/evmcs_test.c ./linux/tools/testing/selftests/kselftest_harness.h
> >  ./linux/tools/testing/selftests/kselftest.h
> >  ./linux/tools/testing/selftests/kvm/libkvm.a
> >  -o ./linux/tools/testing/selftests/kvm/x86_64/evmcs_test
> > /usr/bin/ld: ./linux/tools/testing/selftests/kvm/libkvm.a(vmx.o):
> >  ./linux/tools/testing/selftests/kvm/include/x86_64/vmx.h:603:
> >  multiple definition of `ctrl_exit_rev'; /tmp/ccMQpvNt.o:
> >  ./linux/tools/testing/selftests/kvm/include/x86_64/vmx.h:603:
> >  first defined here
> > /usr/bin/ld: ./linux/tools/testing/selftests/kvm/libkvm.a(vmx.o):
> >  ./linux/tools/testing/selftests/kvm/include/x86_64/vmx.h:602:
> >  multiple definition of `ctrl_pin_rev'; /tmp/ccMQpvNt.o:
> >  ./linux/tools/testing/selftests/kvm/include/x86_64/vmx.h:602:
> >  first defined here
> >  ...
> > 
> > ctrl_exit_rev/ctrl_pin_rev/basic variables are only used in
> > vmx_preemption_timer_test.c, just move them there.
> > 
> > Fixes: 8d7fbf01f9af ("KVM: selftests: VMX preemption timer migration test")
> > Reported-by: Marcelo Bandeira Condotta <mcondotta@redhat.com>
> > Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> > ---
> >  tools/testing/selftests/kvm/include/x86_64/vmx.h              | 4 ----
> >  .../testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c  | 4 ++++
> >  2 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tools/testing/selftests/kvm/include/x86_64/vmx.h b/tools/testing/selftests/kvm/include/x86_64/vmx.h
> > index ccff3e6e2704..766af9944294 100644
> > --- a/tools/testing/selftests/kvm/include/x86_64/vmx.h
> > +++ b/tools/testing/selftests/kvm/include/x86_64/vmx.h
> > @@ -598,10 +598,6 @@ union vmx_ctrl_msr {
> >  	};
> >  };
> >  
> > -union vmx_basic basic;
> > -union vmx_ctrl_msr ctrl_pin_rev;
> > -union vmx_ctrl_msr ctrl_exit_rev;
> > -
> >  struct vmx_pages *vcpu_alloc_vmx(struct kvm_vm *vm, vm_vaddr_t *p_vmx_gva);
> >  bool prepare_for_vmx_operation(struct vmx_pages *vmx);
> >  void prepare_vmcs(struct vmx_pages *vmx, void *guest_rip, void *guest_rsp);
> > diff --git a/tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c b/tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c
> > index cc72b6188ca7..a7737af1224f 100644
> > --- a/tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c
> > +++ b/tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c
> > @@ -31,6 +31,10 @@ bool l2_save_restore_done;
> >  static u64 l2_vmx_pt_start;
> >  volatile u64 l2_vmx_pt_finish;
> >  
> > +union vmx_basic basic;
> > +union vmx_ctrl_msr ctrl_pin_rev;
> > +union vmx_ctrl_msr ctrl_exit_rev;
> > +
> >  void l2_guest_code(void)
> >  {
> >  	u64 vmx_pt_delta;
> > 
> 
> Queued both, thanks.

Hmm, someone go awry with your queue a while back?

https://lkml.kernel.org/r/ce6a5284-e09b-2f51-8cb6-baa29b3ac5c3@redhat.com

  reply	other threads:[~2020-06-08 14:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08 11:23 [PATCH 1/2] KVM: selftests: Add x86_64/debug_regs to .gitignore Vitaly Kuznetsov
2020-06-08 11:23 ` [PATCH 2/2] KVM: selftests: fix vmx_preemption_timer_test build with GCC10 Vitaly Kuznetsov
2020-06-08 11:57   ` Paolo Bonzini
2020-06-08 14:38     ` Sean Christopherson [this message]
2020-06-08 14:43       ` Paolo Bonzini

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=20200608143859.GA8223@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=makarandsonare@google.com \
    --cc=mcondotta@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.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