qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Lindsay via <qemu-devel@nongnu.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: richard.henderson@linaro.org, qemu-devel@nongnu.org, cota@braap.org
Subject: Re: plugins: Missing Store Exclusive Memory Accesses
Date: Thu, 21 Oct 2021 16:40:25 -0400	[thread overview]
Message-ID: <YXHQORB9wMncI5uG@strawberry.localdomain> (raw)
In-Reply-To: <87mtn2tv56.fsf@linaro.org>

On Oct 21 13:28, Alex Bennée wrote:
> It's a bit clearer if you use the contrib/execlog plugin:
> 
>   ./qemu-aarch64 -plugin contrib/plugins/libexeclog.so -d plugin  ./tests/tcg/aarch64-linux-user/stxp
> 
>   0, 0x400910, 0xf9800011, "prfm pstl1strm, [x0]
>   0, 0x400914, 0xc87f4410, "ldxp x16, x17, [x0]", load, 0x55007fffd0, load, 0x55007fffd8 
>   0, 0x400918, 0xc8300c02, "stxp w16, x2, x3, [x0]", load, 0x55007fffd0, load, 0x55007fffd8, store, 0x55007fffd0, store, 0x55007fffd8 
>   0, 0x40091c, 0xf1000652, "subs x18, x18, #1"
>   0, 0x400920, 0x54000040, "b.eq #0x400928"
>   0, 0x400924, 0x17fffffb, "b #0x400910"
>   0, 0x400910, 0xf9800011, "prfm pstl1strm, [x0]
>   0, 0x400914, 0xc87f4410, "ldxp x16, x17, [x0]", load, 0x55007fffd0, load, 0x55007fffd8 
>   0, 0x400918, 0xc8300c02, "stxp w16, x2, x3, [x0]", load, 0x55007fffd0, load, 0x55007fffd8, store, 0x55007fffd0, store, 0x55007fffd8 
>   0, 0x40091c, 0xf1000652, "subs x18, x18, #1"
>   0, 0x400920, 0x54000040, "b.eq #0x400928"
>   0, 0x400924, 0x17fffffb, "b #0x400910"
>   0, 0x400910, 0xf9800011, "prfm pstl1strm, [x0]
>   0, 0x400914, 0xc87f4410, "ldxp x16, x17, [x0]", load, 0x55007fffd0, load, 0x55007fffd8 
>   0, 0x400918, 0xc8300c02, "stxp w16, x2, x3, [x0]", load, 0x55007fffd0, load, 0x55007fffd8, store, 0x55007fffd0, store, 0x55007fffd8 
>   0, 0x40091c, 0xf1000652, "subs x18, x18, #1"
>   0, 0x400920, 0x54000040, "b.eq #0x400928"
>   0, 0x400924, 0x17fffffb, "b #0x400910"
>   0, 0x400910, 0xf9800011, "prfm pstl1strm, [x0]
>   0, 0x400914, 0xc87f4410, "ldxp x16, x17, [x0]", load, 0x55007fffd0, load, 0x55007fffd8 
>   0, 0x400918, 0xc8300c02, "stxp w16, x2, x3, [x0]", load, 0x55007fffd0, load, 0x55007fffd8, store, 0x55007fffd0, store, 0x55007fffd8 
>   0, 0x40091c, 0xf1000652, "subs x18, x18, #1"
>   0, 0x400920, 0x54000040, "b.eq #0x400928"
>   0, 0x400924, 0x17fffffb, "b #0x400910"
>   0, 0x400910, 0xf9800011, "prfm pstl1strm, [x0]
>   0, 0x400914, 0xc87f4410, "ldxp x16, x17, [x0]", load, 0x55007fffd0, load, 0x55007fffd8 
>   0, 0x400918, 0xc8300c02, "stxp w16, x2, x3, [x0]", load, 0x55007fffd0, load, 0x55007fffd8, store, 0x55007fffd0, store, 0x55007fffd8 
>   0, 0x40091c, 0xf1000652, "subs x18, x18, #1"
>   0, 0x400920, 0x54000040, "b.eq #0x400928"
>   0, 0x400924, 0x17fffffb, "b #0x400910"
> 
> Although you can see stxp looks a bit weird on account of the loads it
> does during the cmpxchng. So consider me stumped. The only thing I can
> thing of next is to see how closely I can replicate your build
> environment.

I apologize, I had apparently gotten farther behind upstream than I
realized since originally encountering this. I tried the latest upstream
code and am now able to observe the same thing as you. Somewhere between
v6.1.0 and now, the original issue I reported has been resolved.

However, I am not sure reporting loads for a store exclusive makes sense
to me here, either. My understanding is that the stxp needs to check if
it still has exclusive access and QEMU's implementation results in the
extra loads, but I would expect that the plugin interface would only
report architectural loads.

Is there any obvious way to omit the loads from the plugin interface
here?

-Aaron


  reply	other threads:[~2021-10-21 20:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 20:44 plugins: Missing Store Exclusive Memory Accesses Aaron Lindsay
2021-09-17 11:05 ` Alex Bennée
2021-09-17 14:44   ` Aaron Lindsay via
2021-09-21 20:28   ` Aaron Lindsay via
2021-09-22 20:22     ` Aaron Lindsay via
2021-10-20 17:12       ` Aaron Lindsay via
2021-10-20 17:54         ` Alex Bennée
2021-10-20 20:49           ` Aaron Lindsay via
2021-10-21 12:28             ` Alex Bennée
2021-10-21 20:40               ` Aaron Lindsay via [this message]
2021-10-22  8:37                 ` Alex Bennée

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=YXHQORB9wMncI5uG@strawberry.localdomain \
    --to=qemu-devel@nongnu.org \
    --cc=aaron@os.amperecomputing.com \
    --cc=alex.bennee@linaro.org \
    --cc=cota@braap.org \
    --cc=richard.henderson@linaro.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).