[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] linux-user: fix 32bit g2h()/h2g()
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2] linux-user: fix 32bit g2h()/h2g() |
Date: |
Tue, 14 Aug 2018 10:21:01 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 08/14/2018 10:12 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 an "abi_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.
>
> Signed-off-by: Laurent Vivier <address@hidden>
> ---
>
> Notes:
> v2: s/target_ptr/abi_ptr/
> remove strace msync patch from the series
Reviewed-by: Richard Henderson <address@hidden>
r~