diff options
author | Peter Maydell | 2016-10-24 17:26:50 +0200 |
---|---|---|
committer | Peter Maydell | 2016-10-24 17:26:50 +0200 |
commit | e97da98f1173c764e8fd8d2c84f84ec3bdc87488 (patch) | |
tree | 2c4c6f982b4353e5c223b7d642c52f9258378359 /target-arm/cpu.h | |
parent | migration/savevm.c: migrate non-default page size (diff) | |
download | qemu-e97da98f1173c764e8fd8d2c84f84ec3bdc87488.tar.gz qemu-e97da98f1173c764e8fd8d2c84f84ec3bdc87488.tar.xz qemu-e97da98f1173c764e8fd8d2c84f84ec3bdc87488.zip |
target-arm: Make page size a runtime setting
Rather than defining TARGET_PAGE_BITS to always be 10,
switch to using a value picked at runtime. This allows us
to use 4K pages for modern ARM CPUs (and in particular all
64-bit CPUs) without having to drop support for the old
ARMv5 CPUs which had 1K pages.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-arm/cpu.h')
-rw-r--r-- | target-arm/cpu.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 2218c00dad..6695390075 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -1766,10 +1766,11 @@ bool write_cpustate_to_list(ARMCPU *cpu); #if defined(CONFIG_USER_ONLY) #define TARGET_PAGE_BITS 12 #else -/* The ARM MMU allows 1k pages. */ -/* ??? Linux doesn't actually use these, and they're deprecated in recent - architecture revisions. Maybe a configure option to disable them. */ -#define TARGET_PAGE_BITS 10 +/* ARMv7 and later CPUs have 4K pages minimum, but ARMv5 and v6 + * have to support 1K tiny pages. + */ +#define TARGET_PAGE_BITS_VARY +#define TARGET_PAGE_BITS_MIN 10 #endif #if defined(TARGET_AARCH64) |