aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnton Johansson <anjo@rev.ng>2023-03-06 18:52:08 +0100
committerRichard Henderson <richard.henderson@linaro.org>2023-03-13 06:44:35 -0700
commitffd824f3f32d135c81cbc70f2e3f2edd0496f330 (patch)
treeb5bdd7405eda2d600646d268236372c0f49b7a2f /include
parent47f7313d817a895fcbcedebc11f757cbdfecea30 (diff)
downloadqemu-ffd824f3f32d135c81cbc70f2e3f2edd0496f330.zip
qemu-ffd824f3f32d135c81cbc70f2e3f2edd0496f330.tar.gz
qemu-ffd824f3f32d135c81cbc70f2e3f2edd0496f330.tar.bz2
include/exec: Set default `NB_MMU_MODES` to 16
Signed-off-by: Anton Johansson <anjo@rev.ng> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230306175230.7110-2-anjo@rev.ng> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/exec/cpu-defs.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
index cd8aa17..5f6b8ee 100644
--- a/include/exec/cpu-defs.h
+++ b/include/exec/cpu-defs.h
@@ -36,9 +36,6 @@
#ifndef TARGET_LONG_BITS
# error TARGET_LONG_BITS must be defined in cpu-param.h
#endif
-#ifndef NB_MMU_MODES
-# error NB_MMU_MODES must be defined in cpu-param.h
-#endif
#ifndef TARGET_PHYS_ADDR_SPACE_BITS
# error TARGET_PHYS_ADDR_SPACE_BITS must be defined in cpu-param.h
#endif
@@ -57,6 +54,14 @@
#include "exec/target_long.h"
+/*
+ * Fix the number of mmu modes to 16, which is also the maximum
+ * supported by the softmmu tlb api.
+ */
+#ifndef NB_MMU_MODES
+#define NB_MMU_MODES 16
+#endif
+
#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
/* use a fully associative victim tlb of 8 entries */