From: Paolo Bonzini <pbonzini@redhat.com>
To: Wenjie Liu <lwj0012@gmail.com>, Peter Maydell <peter.maydell@linaro.org>
Cc: "Stefan Hajnoczi" <stefanha@gmail.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Lluís Vilanova" <vilanova@ac.upc.edu>
Subject: Re: [Qemu-devel] About address mapping between host and guest in QEMU
Date: Fri, 24 Apr 2015 13:26:22 +0200 [thread overview]
Message-ID: <553A285E.9050406@redhat.com> (raw)
In-Reply-To: <CAJtFJta02Q2fHY=r4WDAJsbqcNeZCEth999gTOYDTt2ZpN16=A@mail.gmail.com>
On 24/04/2015 04:10, Wenjie Liu wrote:
> The thing I am trying to achieve is to get the data and guest physical
> address of every guest memory access, so I need to known which API can
> be used to do the address transform.
The short answer is that is difficult, because most guest memory
accesses do not call any C function. QEMU has a virtual TLB; if you
have a TLB hit, the code generated by the JIT compiler does the conversion.
A C function is called only if you have a TLB miss, or if the guest is
accessing a device. These C functions are defined in
softmmu_template.h. The header is included multiple from cputlb.c.
Paolo
next prev parent reply other threads:[~2015-04-24 11:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 13:31 [Qemu-devel] About address mapping between host and guest in QEMU Wenjie Liu
2015-04-22 15:26 ` Wenjie Liu
2015-04-23 13:56 ` Wenjie Liu
2015-04-23 14:03 ` Peter Maydell
2015-04-24 2:10 ` Wenjie Liu
2015-04-24 11:26 ` Paolo Bonzini [this message]
2015-04-24 12:46 ` Peter Maydell
2015-04-24 19:09 ` Christopher Covington
2015-04-24 19:50 ` Brendan Dolan-Gavitt
2015-04-24 23:48 ` Christopher Covington
2015-04-25 1:51 ` Wenjie Liu
2015-04-25 12:23 ` 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=553A285E.9050406@redhat.com \
--to=pbonzini@redhat.com \
--cc=lwj0012@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=vilanova@ac.upc.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.