[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC for 2.8 3/3] cpu-defs.h: add compile check for HOST vs
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [RFC for 2.8 3/3] cpu-defs.h: add compile check for HOST vs TARGET LONG_BITS |
Date: |
Tue, 9 Aug 2016 16:55:27 +0100 |
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 <address@hidden>
---
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