From: Xin Tong <xerox.time.tech@gmail.com>
To: "陳韋任 (Wei-Ren Chen)" <chenwj@iis.sinica.edu.tw>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] passing translated address out in QEMU
Date: Thu, 23 Aug 2012 20:24:32 -0700 [thread overview]
Message-ID: <CALKntY3kafbMceAkQC0Dm3QQtHDQGNB9ZCXbeakshuzQs-+J7w@mail.gmail.com> (raw)
In-Reply-To: <20120824025721.GA62179@cs.nctu.edu.tw>
On Thu, Aug 23, 2012 at 7:57 PM, 陳韋任 (Wei-Ren Chen)
<chenwj@iis.sinica.edu.tw> wrote:
>> even that. is it possible to pass host virtual out. the fast path add
>> the addend to get host virtual ? so it must be in a register, most
>> likely eax in i386. what do you think would be the best way to get
>> that out ?
>
> Take a look on comment on tcg_out_tlb_load (tcg/i386/tcg-target.c).
>
> First argument register is loaded with the low part of the address.
> In the TLB hit case, it has been adjusted as indicated by the TLB
> and so is a host address. In the TLB miss case, it continues to
> hold a guest address.
>
> So I guess you can take "tcg_target_call_iarg_regs[0]" as host virtual
> address if software tlb hit.
>
> /* TLB Hit. */
> tcg_out_qemu_ld_direct(s, data_reg, data_reg2,
> tcg_target_call_iarg_regs[0], 0, opc);
>
> As for how do you get host virtual address out, I think you can write
> a helper function logging those host virtual address into a file or
> something else, then insert a helper function call at the point of
> TLB hit.
>
> HTH,
> chenwj
>
> --
> Wei-Ren Chen (陳韋任)
> Computer Systems Lab, Institute of Information Science,
> Academia Sinica, Taiwan (R.O.C.)
> Tel:886-2-2788-3799 #1667
> Homepage: http://people.cs.nctu.edu.tw/~chenwj
That might be difficult. what i did was that i disabled inlined
translated and push the virt/phys address into 2 new fields in the cpu
structure in the call out lookup. because in the callout lookup we
have a handle to the cpu env.
not too sure how much impact inlined lookup has on the performance.
since i disabled it, next step i would just get rid of that piece of
generated assembly, as it is no good for icache ( generated for every
memory operation).
Xin
next prev parent reply other threads:[~2012-08-24 3:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 17:17 [Qemu-devel] passing translated address out in QEMU Xin Tong
2012-08-23 3:14 ` 陳韋任 (Wei-Ren Chen)
2012-08-23 4:38 ` Xin Tong
2012-08-23 10:06 ` 陳韋任 (Wei-Ren Chen)
2012-08-23 10:11 ` 陳韋任 (Wei-Ren Chen)
2012-08-23 15:34 ` Xin Tong
2012-08-23 15:52 ` Peter Maydell
2012-08-23 16:18 ` Xin Tong
2012-08-23 21:55 ` Steven
2012-08-24 2:57 ` 陳韋任 (Wei-Ren Chen)
2012-08-24 3:24 ` Xin Tong [this message]
2012-08-24 4:06 ` 陳韋任 (Wei-Ren Chen)
2012-08-24 4:29 ` Xin Tong
2012-08-24 8:15 ` 陳韋任 (Wei-Ren Chen)
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=CALKntY3kafbMceAkQC0Dm3QQtHDQGNB9ZCXbeakshuzQs-+J7w@mail.gmail.com \
--to=xerox.time.tech@gmail.com \
--cc=chenwj@iis.sinica.edu.tw \
--cc=peter.maydell@linaro.org \
--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).