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: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH 2/2] linux-user: fix 32bit g2h()/h2g()
Date: Fri, 10 Aug 2018 21:40:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Le 10/08/2018 à 21:30, Richard Henderson a écrit :
> 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.

I can, I have no preference for that.

The abi_XXX types have an alignment attribute, while the target_XXX
don't. Do you think I should add it to the abi_ptr type?

Thanks,
Laurent



reply via email to

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