From: Richard Henderson <rth@twiddle.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH v3] tcg/ppc: Improve unaligned load/store handling on 64-bit backend
Date: Fri, 24 Jul 2015 05:34:39 -0700 [thread overview]
Message-ID: <55B230DF.8000900@twiddle.net> (raw)
In-Reply-To: <1437455978.5809.2.camel@kernel.crashing.org>
On 07/20/2015 10:19 PM, Benjamin Herrenschmidt wrote:
> Currently, we get to the slow path for any unaligned access in the
> backend, because we effectively preserve the bottom address bits
> below the alignment requirement when comparing with the TLB entry,
> so any non-0 bit there will cause the compare to fail.
>
> For the same number of instructions, we can instead add the access
> size - 1 to the address and stick to clearing all the bottom bits.
>
> That means that normal unaligned accesses will not fallback (the HW
> will handle them fine). Only when crossing a page boundary well we
> end up having a mismatch because we'll end up pointing to the next
> page which cannot possibly be in that same TLB entry.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> v3. Add MO_ALIGN support for front-ends requiring aligned accesses
> v2. This is the correct version of the patch, the one that
> actually works :-)
>
> tcg/ppc/tcg-target.c | 41 +++++++++++++++++++++++++++++++----------
> 1 file changed, 31 insertions(+), 10 deletions(-)
Applied to tcg-next.
r~
prev parent reply other threads:[~2015-07-24 12:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 5:19 [Qemu-devel] [PATCH v3] tcg/ppc: Improve unaligned load/store handling on 64-bit backend Benjamin Herrenschmidt
2015-07-21 6:27 ` Richard Henderson
2015-07-21 6:33 ` Benjamin Herrenschmidt
2015-07-21 6:39 ` Richard Henderson
2015-07-21 9:46 ` Benjamin Herrenschmidt
2015-07-21 12:04 ` Alexander Graf
2015-07-21 12:26 ` Benjamin Herrenschmidt
2015-07-21 13:48 ` Paolo Bonzini
2015-07-21 14:18 ` Alexander Graf
2015-07-21 21:09 ` Benjamin Herrenschmidt
2015-07-21 21:06 ` Benjamin Herrenschmidt
2015-07-21 15:30 ` Aurelien Jarno
2015-07-21 15:29 ` Aurelien Jarno
2015-07-24 12:34 ` Richard Henderson [this message]
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=55B230DF.8000900@twiddle.net \
--to=rth@twiddle.net \
--cc=agraf@suse.de \
--cc=aurelien@aurel32.net \
--cc=benh@kernel.crashing.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).