From patchwork Tue Aug 9 15:55:25 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: 73573 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp5176qga; Tue, 9 Aug 2016 10:27:44 -0700 (PDT) X-Received: by 10.55.18.225 with SMTP id 94mr35858821qks.240.1470763218039; Tue, 09 Aug 2016 10:20:18 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id d144si18302467qkc.297.2016.08.09.10.20.17 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 09 Aug 2016 10:20:18 -0700 (PDT) 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; dkim=fail header.i=@linaro.org; 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; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXAhN-0000oa-D9 for patch@linaro.org; Tue, 09 Aug 2016 13:20:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX9NH-0005B0-C7 for qemu-devel@nongnu.org; Tue, 09 Aug 2016 11:55:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bX9NC-0003Oi-Fv for qemu-devel@nongnu.org; Tue, 09 Aug 2016 11:55:26 -0400 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:36926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX9NC-0003OY-95 for qemu-devel@nongnu.org; Tue, 09 Aug 2016 11:55:22 -0400 Received: by mail-wm0-x230.google.com with SMTP id i5so44683909wmg.0 for ; Tue, 09 Aug 2016 08:55:22 -0700 (PDT) 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=oKBa7PNUGYTJSIE7BSg9wvpicEiM4vo3rVDhWG9yXiE=; b=iPl1ksclEURV7NiJAEBxs/O8T0COt+ARC88GSAneQiNgf94o0ASq5Ho1UgRcqEnCsC aH/nPTjiOAYBwK4lgdVKb6rMKyJ96YAc687YSr6MoADDwZrdwsim87VPcPBM70Eopnsq e04oBdUU6xR0mZZgTjgsjVYzTCu4MEIlOFQAs= 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=oKBa7PNUGYTJSIE7BSg9wvpicEiM4vo3rVDhWG9yXiE=; b=cpoqE0D4A7djGfGYsUyOfHqpfjgNIPsiPE6hAhOKLW1J2bc7asKFUMUPQnsnX3t9n3 YR99b7sbN6WgzSgWdY13EYA3w60QrTDwapchscmB3ZAFMp4kf1FOm2tOhPjgPG/CWKCS ojtwvmc0+GVVnYVuoY2c+zfRktXzNOrSiDEBskzdQWOCjPX7/vOANtVQry7WeNhw5aFx cV6B16nEo5Kzubm/8QEaUgD9KxcDK9GhM/quwlSmJesoD6dtypRCYafW+txwOoo3wxVJ 7hEso3fMM/znO7Bw+2fBSsJeIGr8Yv8Wx315PQINbSskTaK4mGb29jDN8IV6ajLttZI1 jNmg== X-Gm-Message-State: AEkoouuCJmdlKO/p4i7F0xpKEkdb+nzqKkdFu5DXbCRs+S+V4mEE74IKKC1+sjXxmyOGsZkv X-Received: by 10.28.214.130 with SMTP id n124mr21134796wmg.37.1470758121418; Tue, 09 Aug 2016 08:55:21 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id g67sm3967672wme.5.2016.08.09.08.55.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Aug 2016 08:55:19 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id BD0AB3E05E9; Tue, 9 Aug 2016 16:55:28 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 9 Aug 2016 16:55:25 +0100 Message-Id: <1470758127-17769-2-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470758127-17769-1-git-send-email-alex.bennee@linaro.org> References: <1470758127-17769-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::230 Subject: [Qemu-devel] [RFC for 2.8 1/3] configure: check CPU width and disable larger guests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Emulating 64 bit guests on a 32 bit host is either impossible with KVM or needs a lot of special casing for TCG targets. As 64 bit hosts are fairly normal nowadays and there can't be many people trying this combination lets disable it completely. Signed-off-by: Alex Bennée --- configure | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/configure b/configure index f57fcc6..7b779c1 100755 --- a/configure +++ b/configure @@ -478,6 +478,7 @@ elif check_define __x86_64__ ; then cpu="x32" else cpu="x86_64" + cpu_width=64 fi elif check_define __sparc__ ; then if check_define __arch64__ ; then @@ -515,26 +516,36 @@ ARCH= # Normalise host CPU name and set ARCH. # Note that this case should only have supported host CPUs, not guests. case "$cpu" in - ia64|ppc|ppc64|s390|s390x|sparc64|x32) + ppc|s390|x32) cpu="$cpu" + cpu_width=32 + ;; + ia64|ppc64|s390x|sparc64) + cpu="$cpu" + cpu_width=64 ;; i386|i486|i586|i686|i86pc|BePC) cpu="i386" + cpu_width=32 ;; x86_64|amd64) cpu="x86_64" + cpu_width=64 ;; armv*b|armv*l|arm) cpu="arm" + cpu_width=32 ;; aarch64) cpu="aarch64" + cpu_width=32 ;; mips*) cpu="mips" ;; sparc|sun4[cdmuv]) cpu="sparc" + cpu_width=32 ;; *) # This will result in either an error or falling back to TCI later @@ -1700,6 +1711,26 @@ else fi ########################################## +# host address width checks +too_wide_targets="" + +if test "$cpu_width" = "32"; then + for target in $target_list; do + target_name=$(echo $target | cut -d '-' -f 1) + case "$target_name" in + aarch64|mips64|ppc64|s390x|sparc64) + too_wide_targets="$too_wide_targets $target" + ;; + esac + done +fi + +if test ! -z "$too_wide_targets" ; then + error_exit "Support for the following targets can't be built on 32 bit systems:\n\t$too_wide_targets" +fi + + +########################################## # cocoa implies not SDL or GTK # (the cocoa UI code currently assumes it is always the active UI # and doesn't interact well with other UI frontend code) @@ -4795,6 +4826,7 @@ if test "$slirp" = "yes" ; then fi echo "module support $modules" echo "host CPU $cpu" +echo "host CPU width $cpu_width" echo "host big endian $bigendian" echo "target list $target_list" echo "tcg debug enabled $debug_tcg"