Hi Erik,

On 01/17/2014 01:33 AM, Erik de Castro Lopo wrote:
> Hi all,
> 
> I'm currently working on implementing a missing part of a linux-user
> syscall. This syscall includes a function pointer for a callback.
> 
> If one has a 64 bit user space emulation running on a 32 bit host,
> how does one handle the fact that the pointer might be 64 bits?
> 
> Does the fact that the 32 bit host can only ever give out 32 bit
> addreses to the 64 bit guest just cancel out the possibility of
> any problems?

Not that I know anything about QEMU internals yet, but just for fun here's my
armchair philosophizing. My interpretation of the scenario you describe is
that some function exists in a 64-bit instruction set architecture. QEMU/TCG
has translated it to the host's native 32-bit ISA for actual execution. It
seems like you should be exclusively communicating the address of the 32-bit
translated version to the host kernel. I don't think the host kernel could do
anything useful with a pointer to the foreign ISA version, even if it got the
address right.

Regards,
Christopher

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.

Reply via email to