From mboxrd@z Thu Jan 1 00:00:00 1970 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 26 Feb 2016 13:15:29 +0000 Message-Id: <1456492533-17171-8-git-send-email-alex.bennee@linaro.org> 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [RFC 07/11] arm/run: allow aarch64 to start arm binaries List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mttcg@listserver.greensocs.com, mark.burton@greensocs.com, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com 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 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(-) 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 -- 2.7.1