Re: [PATCH] linux-user/sh4: allow full 32-bit address space

Michael Tokarev <[email protected]>
Newsgroups gmane.comp.emulators.qemu.stable,gmane.comp.emulators.qemu
Message-ID <[email protected]>
On 7/27/26 14:48, Laurent Vivier wrote:
> On real SH4 hardware, the address space is split between user mode
> (U0, 0x00000000-0x7fffffff) and kernel mode (P1-P4, 0x80000000-0xffffffff),
> so TARGET_VIRT_ADDR_SPACE_BITS was set to 31 for CONFIG_USER_ONLY.
> 
> However, qemu-user does not emulate the MMU, so this limit is not needed.
> The only effect is to restrict reserved_va to 2 GB, causing OOM failures
> for memory-intensive builds (e.g. webkit2gtk on Debian sh4 buildds).
> 
> Set TARGET_VIRT_ADDR_SPACE_BITS to 32 unconditionally, like most other
> 32-bit targets. Also fix the TASK_UNMAPPED_BASE macro to use 1ull instead
> of 1u to avoid undefined behavior when shifting by 32.

Should I pick this one for the stable series too?  So it will find its
way to debian too, for example, so sh4 buildd(s) will feel a bit better? :)

Thanks,

/mjt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.