@samitouri / QOSamiQemu / commits / e819c126a8

target/loongarch: Enable TARGET_PAGE_BITS_VARY for loongarch64 user-only

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 <shankerwangmiao@gmail.com> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-ID: <20260630-loong64-vary-page-sz-v1-1-1d1a894674be@gmail.com> Signed-off-by: Song Gao <gaosong@loongson.cn>

Miao Wang committed Jun 30, 2026 at 15:56 UTC e819c126a8d9629f57deef31689f3a7fc476fa45
1 file changed +6 -1
target/loongarch/cpu-param.h
+6 -1
@@ -10,6 +10,11 @@
10
11 #define TARGET_VIRT_ADDR_SPACE_BITS 48
12
13 -#define TARGET_PAGE_BITS 12
13 +#ifdef CONFIG_USER_ONLY
14 +/* Allow user-only to vary page size from 4k */
15 +# define TARGET_PAGE_BITS_VARY
16 +#else
17 +# define TARGET_PAGE_BITS 12
18 +#endif
19
20 #endif