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

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.comp.emulators.qemu,gmane.comp.emulators.qemu.stable
Message-ID <0ba5e0c4f23d77c9a35be32632fb83a499a05f5c.camel@physik.fu-berlin.de>
Hi Michael,

On Thu, 2026-07-30 at 09:45 +0300, Michael Tokarev wrote:
> 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? :)

Yes, please. I have already built local packages with the patch that I am going
to deploy on the buildds once they have finished building the current queue.

If the patch is part of the official package, I don't risk accidentally removing
the patched package again with a future update.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
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.