qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] linux-user: fix 32bit g2h()/h2g()


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 2/2] linux-user: fix 32bit g2h()/h2g()
Date: Fri, 10 Aug 2018 12:30:50 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 08/10/2018 11:53 AM, Laurent Vivier wrote:
> sparc32plus has 64bit long type but only 32bit virtual address space.
> 
> For instance, "apt-get upgrade" failed because of a mmap()/msync()
> sequence.
> 
> mmap() returned 0xff252000 but msync() used g2h(0xffffffffff252000)
> to find the host address. The "(target_ulong)" in g2h() doesn't fix the
> address because it is 64bit long.
> 
> This patch introduces a "target_ptr" that is set to uint32_t
> if the virtual address space is addressed using 32bit in the linux-user
> case. It stays set to target_ulong with softmmu case.

I would prefer the name "abi_ptr", since the full 64-bits of target_ulong are
still used for any actual dereferences.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]