diff mbox

[RFC,for,2.8,3/3] cpu-defs.h: add compile check for HOST vs TARGET LONG_BITS

Message ID 1470758127-17769-4-git-send-email-alex.bennee@linaro.org
State New
Headers show

Commit Message

Alex Bennée Aug. 9, 2016, 3:55 p.m. UTC
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 <alex.bennee@linaro.org>

---
 include/exec/cpu-defs.h | 9 +++++++++
 1 file changed, 9 insertions(+)

-- 
2.7.4
diff mbox

Patch

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