[PATCH v2] target/sparc: Enable variable page size for user-only

Richard Henderson posted 1 patch 1 week, 6 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260913023455.741626-1-richard.henderson@linaro.org
Maintainers: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>
target/sparc/cpu-param.h | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
[PATCH v2] target/sparc: Enable variable page size for user-only
Posted by Richard Henderson 1 week, 6 days ago
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/sparc/cpu-param.h | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/target/sparc/cpu-param.h b/target/sparc/cpu-param.h
index 7ec4ac84dbb..96b46d41164 100644
--- a/target/sparc/cpu-param.h
+++ b/target/sparc/cpu-param.h
@@ -7,15 +7,17 @@
 #ifndef SPARC_CPU_PARAM_H
 #define SPARC_CPU_PARAM_H
 
-#ifdef TARGET_SPARC64
+#ifdef CONFIG_USER_ONLY
+# define TARGET_PAGE_BITS_VARY
+#elif defined(ifdef TARGET_SPARC64)
 # define TARGET_PAGE_BITS 13 /* 8k */
-# ifdef TARGET_ABI32
-#  define TARGET_VIRT_ADDR_SPACE_BITS 32
-# else
-#  define TARGET_VIRT_ADDR_SPACE_BITS 44
-# endif
 #else
 # define TARGET_PAGE_BITS 12 /* 4k */
+#endif
+
+#if defined(TARGET_SPARC64) && !defined(TARGET_ABI32)
+# define TARGET_VIRT_ADDR_SPACE_BITS 44
+#else
 # define TARGET_VIRT_ADDR_SPACE_BITS 32
 #endif
 
-- 
2.53.0