From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Usermode emulation changes
Date: Sat, 25 Mar 2006 19:31:21 +0000 [thread overview]
Message-ID: <200603251931.22488.paul@codesourcery.com> (raw)
I've just committed a relatively large patch to the qemu usermode emulation
code. Before the patch the userspace emulation code assumed that host and
guest address spaces were the same. The goal of these changes is to remove
that assumption. This allows us to do two things:
- Offset the guest address space by a constant amount. This is useful if the
area of memory used by statically linked guest applications is not available
on the host. In particular windows hosts can't map the first 64k of memory,
and Arm applications are usually liked with a base address of 0x8000. Windows
host support is a whole other patch, but this is a prerequisite.
- Use of softmmu with usermode emulation. This makes 64-bit guest on 32-bit
host possible. Actually doing this still requires a significant amount of
work (e.g most of mmap.c would need rewriting).
There are two "safe" ways of accessing guest memory from the syscall code. The
tget* and tput* macros read/write a single value, including appropriate
byteswapping.
Alternatively lock_user (and variants) can be used to obtain a pointer to a
contiguous block of guest memory. The user is still responsible for
byteswapping the data as necessary.
Currently these just bias the value and return the appropriate pointer.
However with softmmu the block may need copying to a temporary location if it
crosses a page boundary. The interface has been designed to allow this to be
implemented efficiently.
Paul
reply other threads:[~2006-03-25 19:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200603251931.22488.paul@codesourcery.com \
--to=paul@codesourcery.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).