mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>, kvm@vger.kernel.org
Cc: Sean Christopherson <sean.j.christopherson@intel.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>,
	Marcelo Bandeira Condotta <mcondotta@redhat.com>,
	Shuah Khan <skhan@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: selftests: Fix "make ARCH=x86_64" build with
Date: Fri, 5 Jun 2020 17:15:40 +0200	[thread overview]
Message-ID: <3a229624-c452-c86d-395d-2baa7392cb62@redhat.com> (raw)
In-Reply-To: <20200605142028.550068-1-vkuznets@redhat.com>

On 05/06/20 16:20, Vitaly Kuznetsov wrote:
> Marcelo reports that kvm selftests fail to build with
> "make ARCH=x86_64":
> 
> gcc -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99
>  -fno-stack-protector -fno-PIE -I../../../../tools/include
>  -I../../../../tools/arch/x86_64/include  -I../../../../usr/include/
>  -Iinclude -Ilib -Iinclude/x86_64 -I.. -c lib/kvm_util.c
>  -o /var/tmp/20200604202744-bin/lib/kvm_util.o
> 
> In file included from lib/kvm_util.c:11:
> include/x86_64/processor.h:14:10: fatal error: asm/msr-index.h: No such
>  file or directory
> 
>  #include <asm/msr-index.h>
>           ^~~~~~~~~~~~~~~~~
> compilation terminated.
> 
> "make ARCH=x86", however, works. The problem is that arch specific headers
> for x86_64 live in 'tools/arch/x86/include', not in
> 'tools/arch/x86_64/include'.
> 
> Fixes: 66d69e081b52 ("selftests: fix kvm relocatable native/cross builds and installs")
> Reported-by: Marcelo Bandeira Condotta <mcondotta@redhat.com>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
>  tools/testing/selftests/kvm/Makefile | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
> index b4ff112e5c7e..4a166588d99f 100644
> --- a/tools/testing/selftests/kvm/Makefile
> +++ b/tools/testing/selftests/kvm/Makefile
> @@ -83,7 +83,11 @@ LIBKVM += $(LIBKVM_$(UNAME_M))
>  INSTALL_HDR_PATH = $(top_srcdir)/usr
>  LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
>  LINUX_TOOL_INCLUDE = $(top_srcdir)/tools/include
> +ifeq ($(ARCH),x86_64)
> +LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/x86/include
> +else
>  LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include
> +endif
>  CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \
>  	-fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \
>  	-I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \
> 

Queued, thanks.

Paolo


      reply	other threads:[~2020-06-05 15:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 14:20 Vitaly Kuznetsov
2020-06-05 15:15 ` Paolo Bonzini [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=3a229624-c452-c86d-395d-2baa7392cb62@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcondotta@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=skhan@linuxfoundation.org \
    --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

all inboxes | Powered by JetHome®