qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Tom Hanson <thomas.hanson@linaro.org>
To: Richard Henderson <rth@twiddle.net>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] best way to implement emulation of AArch64 tagged addresses
Date: Fri, 08 Apr 2016 11:20:06 -0600	[thread overview]
Message-ID: <1460136006.50712.3.camel@TomH-Z-Workstation> (raw)
In-Reply-To: <5702AACF.90306@twiddle.net>

On Mon, 2016-04-04 at 10:56 -0700, Richard Henderson wrote:
> On 04/04/2016 09:31 AM, Peter Maydell wrote:
> > On 4 April 2016 at 17:28, Richard Henderson <rth@twiddle.net> wrote:
> >> On 04/04/2016 08:51 AM, Peter Maydell wrote:
> >>> In particular I think if you just do the relevant handling of the tag
> >>> bits in target-arm's get_phys_addr() and its subroutines then this
> >>> should work ok, with the exceptions that:
> >>>    * the QEMU TLB code will think that [tag A + address X] and
> >>>      [tag B + address X] are different virtual addresses and they will
> >>>      miss each other in the TLB
> >>
> >>
> >> Yep.  Not only miss, but actively contend with each other.
> >
> > Yes. Can we avoid that, or do we just have to live with it? I guess
> > if the TCG fast path is doing a compare on full insn+tag then we
> > pretty much have to live with it.
> 
> We have to live with it.  Implementing a more complex hashing algorithm in the 
> fast path is probably a non-starter.
> 
> Hopefully if one is using multiple tags, they'll still be in the victim cache 
> and so you won't have to fall back to the full tlb lookup.
> 
> 
> r~

It seems like the "best" solution would be to mask the tag in the TLB
and it feels like it should be possible.  BUT I need to dig into the
code more.

Is it an option to mask off the tag bits in all cases? Is there any case
it which those bits are valid address bits?

-TWH

  reply	other threads:[~2016-04-08 17:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 15:51 [Qemu-devel] best way to implement emulation of AArch64 tagged addresses Peter Maydell
2016-04-04 16:28 ` Richard Henderson
2016-04-04 16:31   ` Peter Maydell
2016-04-04 17:56     ` Richard Henderson
2016-04-08 17:20       ` Tom Hanson [this message]
2016-04-08 18:06         ` Peter Maydell
2016-04-08 18:10         ` Richard Henderson
2016-04-09  0:29           ` Thomas Hanson
2016-04-09 15:57             ` Richard Henderson
2016-04-11 12:58               ` Thomas Hanson
2016-04-13 13:36                 ` Tom Hanson
2016-04-04 16:35 ` 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=1460136006.50712.3.camel@TomH-Z-Workstation \
    --to=thomas.hanson@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).