On 9/12/26 00:22, Richard Henderson wrote:
> Sparc v8 has 4k pages, while Sparc v9 has 8k pages. Because of this,
> userland does not assumed a fixed page size (at least true for glibc
> and musl). Allowing the guest to follow the host page size avoids
> a variety of emulation problems.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/sparc/cpu-param.h | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/target/sparc/cpu-param.h b/target/sparc/cpu-param.h
> index 7ec4ac84dbb..72aa89bf66a 100644
> --- a/target/sparc/cpu-param.h
> +++ b/target/sparc/cpu-param.h
> @@ -8,7 +8,11 @@
> #define SPARC_CPU_PARAM_H
>
> #ifdef TARGET_SPARC64
> -# define TARGET_PAGE_BITS 13 /* 8k */
> +# ifdef CONFIG_USER_ONLY
> +# define TARGET_PAGE_BITS_VARY
> +# else
> +# define TARGET_PAGE_BITS 13 /* 8k */
> +# endif
> # ifdef TARGET_ABI32
> # define TARGET_VIRT_ADDR_SPACE_BITS 32
> # else
Even better to reorg this so that it applies to sparc32 as well as
sparc64; v2 tomorrow....
r~