qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Covington <cov@codeaurora.org>
To: qemu-devel@nongnu.org
Cc: Erik de Castro Lopo <mle+tools@mega-nerd.com>
Subject: Re: [Qemu-devel] Question on pointers in the qemu user space emulation
Date: Fri, 17 Jan 2014 09:17:12 -0500	[thread overview]
Message-ID: <52D93B68.7060707@codeaurora.org> (raw)
In-Reply-To: <20140117173320.7f76b2c5735ae5bf7ed98821@mega-nerd.com>

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	other threads:[~2014-01-17 14:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17  6:33 [Qemu-devel] Question on pointers in the qemu user space emulation Erik de Castro Lopo
2014-01-17 14:17 ` Christopher Covington [this message]
2014-01-17 15:16 ` Peter Maydell
2014-01-17 19:20   ` Erik de Castro Lopo
2014-01-18 10:11     ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52D93B68.7060707@codeaurora.org \
    --to=cov@codeaurora.org \
    --cc=mle+tools@mega-nerd.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).