qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Question on pointers in the qemu user space emulation


From: Christopher Covington
Subject: Re: [Qemu-devel] Question on pointers in the qemu user space emulation
Date: Fri, 17 Jan 2014 09:17:12 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

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

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