From: Miao Wang <[email protected]>
Hard coding PAGE_SIZE to 4K will prevent user-only emulation from
working on hosts with 16K page size.
Fixes: 1d832c19db1e ("target/loongarch: Support 4K page size")
Fixes: qemu-project/qemu#3651
Signed-off-by: Miao Wang <[email protected]>
---
target/loongarch/cpu-param.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/target/loongarch/cpu-param.h b/target/loongarch/cpu-param.h
index
3bcf77b3755abdc302699c22c7aa99e2e8c3bbf3..6abe72ff5cab46e246fde4fa76bce05ba7c1cd20
100644
--- a/target/loongarch/cpu-param.h
+++ b/target/loongarch/cpu-param.h
@@ -10,6 +10,11 @@
#define TARGET_VIRT_ADDR_SPACE_BITS 48
-#define TARGET_PAGE_BITS 12
+#ifdef CONFIG_USER_ONLY
+/* Allow user-only to vary page size from 4k */
+# define TARGET_PAGE_BITS_VARY
+#else
+# define TARGET_PAGE_BITS 12
+#endif
#endif
---
base-commit: 30e8a06b64aa58a3990ba39cb5d09531e7d265e0
change-id: 20260630-loong64-vary-page-sz-253ded0be884
Best regards,
--
Miao Wang <[email protected]>