From patchwork Fri Feb 26 13:15:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 63053 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp715579lbc; Fri, 26 Feb 2016 05:23:42 -0800 (PST) X-Received: by 10.141.2.198 with SMTP id e189mr1945434qhd.64.1456493022487; Fri, 26 Feb 2016 05:23:42 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id w13si13117120qha.54.2016.02.26.05.23.42 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 26 Feb 2016 05:23:42 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dkim=fail header.i=@linaro.org Received: from localhost ([::1]:49759 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZIMw-0003BJ-1K for patch@linaro.org; Fri, 26 Feb 2016 08:23:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZIFP-0008PO-O7 for qemu-devel@nongnu.org; Fri, 26 Feb 2016 08:15:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZIFL-0004Fh-Gq for qemu-devel@nongnu.org; Fri, 26 Feb 2016 08:15:55 -0500 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:36883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZIFL-0004FW-AQ for qemu-devel@nongnu.org; Fri, 26 Feb 2016 08:15:51 -0500 Received: by mail-wm0-x234.google.com with SMTP id g62so69780344wme.0 for ; Fri, 26 Feb 2016 05:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bIbqUZP29q3MCYX00yt8MOnPPunVBtV0xYb5LiahlOs=; b=To9pyYZxcx1wJuehaR5tak6tuJsaBwbcUlLBSIkFKdxAUBshpd3xyYETMbdHWhoomg eb6IPOmMPEkixaarCwaaZwoOV2fFNLPb0Kk35b+QaQWEVYd7966eWFJlvu6/K9YXlHLf HYQLxd4hOrf2ukzskIx2fQ7yXQ3ZnCa1N26m0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bIbqUZP29q3MCYX00yt8MOnPPunVBtV0xYb5LiahlOs=; b=ePq02u/XDrvLGHpsNiwrWg1v/1Xq2IUJon/GpdTVa/5O+5GleKLgkoNKZHAlawySti VUdLQyhB9p+dS7jH4L4xZzgo/edF5rbWPGR12PV0gXq8TJ+0PfzcwM8Cs0rPmGr8qL8X ho69thrb/HSLiwRzYtqozTrOaUVwdsb/W4OVGrBTjPbRH8YYH+7stTNDvMaL6YJ+b7ts Kr7yGWkzwMOsLZWRqPrusqWl1Z61QZjxIShUWyUeBxuD/EUKwIdsVq/8J8ev2sqMKisK Fd91Y/VaoTSs0wac2zHm/s8fSERfm3fFZ+zEkOqSH1anLlgUlCTioZFFSeNpcHOcjbab wGNw== X-Gm-Message-State: AD7BkJJAY0RKKB2XyiEefGKN4Ad/pWYJxjJ1ZF1oO2N6wfsa68h0fbkTKSU0OJkkcbZi0UKa X-Received: by 10.28.173.143 with SMTP id w137mr3336714wme.101.1456492550776; Fri, 26 Feb 2016 05:15:50 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n131sm2862064wmf.9.2016.02.26.05.15.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Feb 2016 05:15:46 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 7251F3E030A; Fri, 26 Feb 2016 13:15:41 +0000 (GMT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: mttcg@listserver.greensocs.com, mark.burton@greensocs.com, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com Date: Fri, 26 Feb 2016 13:15:29 +0000 Message-Id: <1456492533-17171-8-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.7.1 In-Reply-To: <1456492533-17171-1-git-send-email-alex.bennee@linaro.org> References: <1456492533-17171-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::234 Cc: peter.maydell@linaro.org, drjones@redhat.com, a.spyridakis@virtualopensystems.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, will.deacon@arm.com, crosthwaitepeter@gmail.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net, rth@twiddle.net Subject: [Qemu-devel] [RFC 07/11] arm/run: allow aarch64 to start arm binaries X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org AArch64 hosts can happily run AArch32 binaries. We just need to ensure that we use "cpu host,aarch64=off" when specifying the CPU type. Signed-off-by: Alex Bennée --- arm/run | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.7.1 diff --git a/arm/run b/arm/run index 0eaf23a..f1a6b7d 100755 --- a/arm/run +++ b/arm/run @@ -38,7 +38,15 @@ if [ "$HOST" = "aarch64" ] && [ "$ACCEL" = "kvm" ]; then fi fi -qemu="${QEMU:-qemu-system-$ARCH_NAME}" +if [ "$ARCH" = "arm" ] && [ "$HOST" = "aarch64" ]; then + qemu="${QEMU:-qemu-system-$HOST}" + if [ "$ACCEL" = "kvm" ]; then + processor="host,aarch64=off" + fi +else + qemu="${QEMU:-qemu-system-$ARCH_NAME}" +fi + qpath=$(which $qemu 2>/dev/null) if [ -z "$qpath" ]; then