From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] RFC: Code fetch optimisation
Date: Fri, 12 Oct 2007 20:36:32 +0200 [thread overview]
Message-ID: <470FBEB0.70606@bellard.org> (raw)
In-Reply-To: <f43fc5580710120821s77b19605y2051f78b0497de5e@mail.gmail.com>
Blue Swirl wrote:
> On 10/12/07, J. Mayer <l_indien@magic.fr> wrote:
>> Here's a small patch that allow an optimisation for code fetch, at least
>> for RISC CPU targets, as suggested by Fabrice Bellard.
>> The main idea is that a translated block is never to span over a page
>> boundary. As the tb_find_slow routine already gets the physical address
>> of the page of code to be translated, the code translator could then
>> fetch the code using raw host memory accesses instead of doing it
>> through the softmmu routines.
>> This patch could also be adapted to RISC CPU targets, with care for the
>> last instruction of a page. For now, I did implement it for alpha, arm,
>> mips, PowerPC and SH4.
>> I don't actually know if the optimsation would bring a sensible speed
>> gain or if it will be absolutelly marginal.
>>
>> Please comment.
>
> This will not work correctly for execution of MMIO registers, but
> maybe that won't work on real hardware either. Who cares.
It can never happen because QEMU currently does not support it (see
get_phys_addr_code()). I started to implement it but never really
finished it (real hardware can do it so QEMU should support it). The
idea consist in using a reserved ram page to store the code. Another
point is that the TB must be discarded once executed as the MMIO data
can change.
Regards,
Fabrice.
next prev parent reply other threads:[~2007-10-12 18:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-12 8:33 [Qemu-devel] RFC: Code fetch optimisation J. Mayer
2007-10-12 15:21 ` Blue Swirl
2007-10-12 18:24 ` Jocelyn Mayer
2007-10-12 18:36 ` Fabrice Bellard [this message]
2007-10-12 18:39 ` Fabrice Bellard
-- strict thread matches above, loose matches on Subject: below --
2007-10-14 11:44 J. Mayer
2007-10-15 2:30 ` Paul Brook
2007-10-15 12:09 ` J. Mayer
2007-10-15 16:01 ` Paul Brook
2007-10-15 16:19 ` Fabrice Bellard
2007-10-15 21:30 ` J. Mayer
2007-10-15 22:42 ` Paul Brook
2007-10-16 20:27 ` J. Mayer
2007-10-16 22:00 ` Paul Brook
2007-10-16 23:38 ` J. Mayer
2007-10-17 0:43 ` Paul Brook
2007-10-16 22:26 ` Paul Brook
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=470FBEB0.70606@bellard.org \
--to=fabrice@bellard.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).