From patchwork Tue Sep 23 14:56:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 37734 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7968120792 for ; Tue, 23 Sep 2014 15:00:37 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id 10sf4152242lbg.9 for ; Tue, 23 Sep 2014 08:00:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:in-reply-to:message-id :references:user-agent:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=h6G3C2TU/24qfHbJd4vuN9e9RK54MiThUKlakrVReiM=; b=Ekzvm+0x7IIRKmKkO/x9I0Pn77byWnFAa6db0aOKO1/dTkI1NUIpDJZ1/3GjEGXj90 qJ4sq2H07fD07t4CUzH3cAMmmnPP7VOqOgpY1ZWlErXtBoTtYdXu6IlwWj34luC0YRiP ZJU497BRkj9b/wAxTJ9OrvikGqM218xJnD4uO/+UIPjXuPmqifF1nbfurC5nfOt5FvRD lWE0dRFX3LUL9YFmsxKg2U8zkOb2FMCU3tz9SZdTiw2qp90Y+MqgiKgHbLN84LiZ/8H4 xITMtkKImmGywshiefSP/HItT5imbvuWvp/ADPh1kBTq6Dn2V0BblGQezc0DYZ5AWMiz oxsQ== X-Gm-Message-State: ALoCoQmA9tVpw7hOVQ/x8CPrczw6+iTj+rQ4WM2gU7lVoO+6UREQ9ZFZuHlLqsEmkGghFcTAf03K X-Received: by 10.152.2.97 with SMTP id 1mr51448lat.6.1411484436227; Tue, 23 Sep 2014 08:00:36 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.195 with SMTP id g3ls62693lam.59.gmail; Tue, 23 Sep 2014 08:00:36 -0700 (PDT) X-Received: by 10.152.37.72 with SMTP id w8mr212570laj.48.1411484436046; Tue, 23 Sep 2014 08:00:36 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) by mx.google.com with ESMTPS id g1si19046178lbc.52.2014.09.23.08.00.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Sep 2014 08:00:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id ty20so8808416lab.37 for ; Tue, 23 Sep 2014 08:00:35 -0700 (PDT) X-Received: by 10.152.179.226 with SMTP id dj2mr230599lac.40.1411484435901; Tue, 23 Sep 2014 08:00:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp427437lbb; Tue, 23 Sep 2014 08:00:34 -0700 (PDT) X-Received: by 10.140.19.36 with SMTP id 33mr409400qgg.32.1411484433539; Tue, 23 Sep 2014 08:00:33 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id j6si12594745qae.107.2014.09.23.08.00.33 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 23 Sep 2014 08:00:33 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XWRY4-0002Hz-2S; Tue, 23 Sep 2014 14:58:36 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XWRY3-0002Hq-1T for xen-devel@lists.xensource.com; Tue, 23 Sep 2014 14:58:35 +0000 Received: from [193.109.254.147:31508] by server-14.bemta-14.messagelabs.com id D8/D5-18345-A9A81245; Tue, 23 Sep 2014 14:58:34 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-5.tower-27.messagelabs.com!1411484312!7887687!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.12.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 3984 invoked from network); 23 Sep 2014 14:58:33 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-5.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 23 Sep 2014 14:58:33 -0000 X-IronPort-AV: E=Sophos;i="5.04,580,1406592000"; d="scan'208";a="174312167" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Tue, 23 Sep 2014 10:58:30 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1XWRXy-0000si-CO; Tue, 23 Sep 2014 15:58:30 +0100 Date: Tue, 23 Sep 2014 15:56:31 +0100 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Ian Campbell In-Reply-To: <1411479334.1781.44.camel@kazak.uk.xensource.com> Message-ID: References: <1406907139-16800-3-git-send-email-stefano.stabellini@eu.citrix.com> <1411479334.1781.44.camel@kazak.uk.xensource.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-DLP: MIA2 Cc: xen-devel@lists.xensource.com, Ian.Jackson@eu.citrix.com, Stefano Stabellini Subject: Re: [Xen-devel] [PATCH v4 3/3] enable QEMU for ARM builds X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: On Tue, 23 Sep 2014, Ian Campbell wrote: > On Fri, 2014-08-01 at 16:32 +0100, Stefano Stabellini wrote: > > Build qemu-xen on ARM and ARM64: it is used to provide the PV backends, > > disk and framebuffer in particular. > > > > Ideally we would also modify the configure options to only build what is > > necessary: a machine just for PV backends. However that is a work in > > progress and not yet available in QEMU (see > > http://marc.info/?l=qemu-devel&m=139082425718379&w=2). So we just build > > the usual i386 target, even though no i386 emulation is going to be done > > by qemu-xen on ARM. > > > > Signed-off-by: Stefano Stabellini > > This doesn't build for arm64: > if test -d git://xenbits.xen.org/qemu-upstream-unstable.git ; then \ > source=git://xenbits.xen.org/qemu-upstream-unstable.git; \ > else \ > source=.; \ > fi; \ > cd qemu-xen-dir; \ > $source/configure --enable-xen --target-list=i386-softmmu \ > --enable-debug --enable-trace-backend=stderr \ > --prefix=/usr/local/lib/xen \ > --libdir=/usr/local/lib/xen/lib \ > --includedir=/usr/local/lib/xen/include \ > --source-path=$source \ > --extra-cflags="-I/local/scratch/ianc/devel/committer-arm64.git/tools/../tools/include \ > -I/local/scratch/ianc/devel/committer-arm64.git/tools/../tools/libxc/include \ > -I/local/scratch/ianc/devel/committer-arm64.git/tools/../tools/xenstore/include \ > -I/local/scratch/ianc/devel/committer-arm64.git/tools/../tools/xenstore/compat/include \ > " \ > --extra-ldflags="-L/local/scratch/ianc/devel/committer-arm64.git/tools/../tools/libxc \ > -L/local/scratch/ianc/devel/committer-arm64.git/tools/../tools/xenstore \ > -Wl,-rpath=/usr/local/lib/xen/lib" \ > --bindir=/usr/local/lib/xen/bin \ > --datadir=/usr/local/share/qemu-xen \ > --localstatedir=/var \ > --disable-kvm \ > --disable-docs \ > --disable-guest-agent \ > --python=python \ > \ > --cpu=arm64 --cross-prefix=aarch64-linux-gnu- --interp-prefix=/usr/aarch64-linux-gnu/sys-root; \ > make all > > ERROR: Unsupported CPU = arm64, try --enable-tcg-interpreter > > make[3]: Entering directory `/local/scratch/ianc/devel/committer-arm64.git/tools/qemu-xen-dir-remote' > make[3]: *** No rule to make target `/qemu-options.hx', needed by `qemu-options.def'. Stop. > > I think upstream calls arm64 aarch64, or maybe our qemu isn't new enough yet? > > Since osstest doesn't yet include arm64 we aren't going to block > staging->master over this but we should still fix. Either by removing > aarch64 from the configure test or by making it actually build (by > adjusting --cpu=?). Does the following fix the issue for you? diff --git a/config/arm32.mk b/config/arm32.mk index aa79d22..5f056bd 100644 --- a/config/arm32.mk +++ b/config/arm32.mk @@ -18,3 +18,6 @@ HAS_NS16550 := y LDFLAGS_DIRECT += -EL CONFIG_LOAD_ADDRESS ?= 0x80000000 + +#QEMU CPU arch +IOEMU_CPU_ARCH ?= arm diff --git a/config/arm64.mk b/config/arm64.mk index 15b57a4..f42ffe0 100644 --- a/config/arm64.mk +++ b/config/arm64.mk @@ -13,3 +13,6 @@ HAS_NS16550 := y LDFLAGS_DIRECT += -EL CONFIG_LOAD_ADDRESS ?= 0x80000000 + +#QEMU CPU arch +IOEMU_CPU_ARCH ?= aarch64 diff --git a/config/x86_32.mk b/config/x86_32.mk index 7f76b25..0da63ed 100644 --- a/config/x86_32.mk +++ b/config/x86_32.mk @@ -12,3 +12,6 @@ CFLAGS += -m32 -march=i686 LDFLAGS_DIRECT_OpenBSD = _obsd LDFLAGS_DIRECT_FreeBSD = _fbsd LDFLAGS_DIRECT += -melf_i386$(LDFLAGS_DIRECT_$(XEN_OS)) + +#QEMU CPU arch +IOEMU_CPU_ARCH ?= i386 diff --git a/config/x86_64.mk b/config/x86_64.mk index 11104bd..f5c32a2 100644 --- a/config/x86_64.mk +++ b/config/x86_64.mk @@ -25,3 +25,6 @@ else LDFLAGS_DIRECT += -melf_x86_64 endif endif + +#QEMU CPU arch +IOEMU_CPU_ARCH ?= x86_64 diff --git a/tools/Makefile b/tools/Makefile index 1130369..57eaa17 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -106,7 +106,7 @@ distclean: subdirs-distclean config.cache autom4te.cache ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) -IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \ +IOEMU_CONFIGURE_CROSS ?= --cpu=$(IOEMU_CPU_ARCH) \ --cross-prefix=$(CROSS_COMPILE) \ --interp-prefix=$(CROSS_SYS_ROOT) endif