From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: "J. Mayer" <l_indien@magic.fr>
Subject: Re: [Qemu-devel] RFC: Code fetch optimisation
Date: Mon, 15 Oct 2007 23:42:06 +0100 [thread overview]
Message-ID: <200710152342.08019.paul@codesourcery.com> (raw)
In-Reply-To: <1192483833.9976.456.camel@rapid>
> > VLE targets (x86, m68k) can translate almost a full page of instructions,
> > and a page boundary can be anywhere within that block. Once we've spanned
> > multiple pages there's not point stopping translation immediately. We may
> > as well translate as many instructions as we can on the second page.
> >
> > I'd guess most TB are much smaller than a page, so on average only a few
> > instructions are going to come after the page boundary.
>
> This leads me to another reflexion. For fixed length encoding targets,
> we always stop translation when reaching a page boundary. If we keep
> using the current model and we optimize the slow case, it would be
> possible to stop only if we cross 2 pages boundary during code
> translation, and it seems that this case is not likely to happen. If we
> keep the current behavior, we could remove the second page_addr element
> in the tb structure and maybe optimize parts of the tb management and
> invalidation code.
The latter may be the only feasible option.
Some targets (ARMv5, maybe others) do not have an explicit fault address for
MMU instruction faults. The faulting address is the address of the current
instruction when the fault occurs. Prefetch aborts are generated at
translation time, which effectively means the faulting instruction must be at
the start of a TB. Terminating the TB on a page boundary guarantees this
behavior.
For VLE targets we already get this wrong (the prefetch abort occurs some time
before the faulting instruction executes). I don't know if this behavior is
permitted by the ISA, but it's definitely possible to construct cases where
it has visible effect.
Paul
next prev parent reply other threads:[~2007-10-15 22:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-14 11:44 [Qemu-devel] RFC: Code fetch optimisation 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 [this message]
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
-- strict thread matches above, loose matches on Subject: below --
2007-10-12 8:33 J. Mayer
2007-10-12 15:21 ` Blue Swirl
2007-10-12 18:24 ` Jocelyn Mayer
2007-10-12 18:36 ` Fabrice Bellard
2007-10-12 18:39 ` Fabrice Bellard
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=200710152342.08019.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=l_indien@magic.fr \
--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).