Received: from eggs.gnu.org ([2001:4830:134:3::10]:45727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX9NH-0005Az-C5 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 1bX9NE-0003Pl-CK for qemu-devel@nongnu.org; Tue, 09 Aug 2016 11:55:26 -0400 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:36955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX9NE-0003PJ-5k for qemu-devel@nongnu.org; Tue, 09 Aug 2016 11:55:24 -0400 Received: by mail-wm0-x22d.google.com with SMTP id i5so44685848wmg.0 for ; Tue, 09 Aug 2016 08:55:23 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 9 Aug 2016 16:55:27 +0100 Message-Id: <1470758127-17769-4-git-send-email-alex.bennee@linaro.org> 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [RFC for 2.8 3/3] cpu-defs.h: add compile check for HOST vs TARGET LONG_BITS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, rth@twiddle.net, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Paolo Bonzini , Peter Crosthwaite This shouldn't trigger as the configure check ensures we don't build any unsupported combinations. However we make the explicit check in cpu-defs to catch any new ones being introduced. Signed-off-by: Alex Bennée --- include/exec/cpu-defs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index 5f4e303..499e1a8 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -54,6 +54,15 @@ typedef uint64_t target_ulong; #error TARGET_LONG_SIZE undefined #endif +/* Supporting 64 bit vCPUs on 32 bit hosts is getting increasingly + * complicated so we no longer do it. The configure script should have + * prevented such a configuration being built but we double check + * here. + */ +#if HOST_LONG_BITS < TARGET_LONG_BITS +#error wide-on-narrow CPU emulation is no longer supported +#endif + #if !defined(CONFIG_USER_ONLY) /* use a fully associative victim tlb of 8 entries */ #define CPU_VTLB_SIZE 8 -- 2.7.4