qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, david@redhat.com,
	balaton@eik.bme.hu
Subject: Re: [PATCH 0/2] target/arm: Fix unwind from dc zva and FEAT_MOPS
Date: Thu, 04 Jul 2024 16:50:17 +0200	[thread overview]
Message-ID: <13b19a4859e25274d05663bc0ca05621c56af985.camel@linux.ibm.com> (raw)
In-Reply-To: <20240702234155.2106399-1-richard.henderson@linaro.org>

On Tue, 2024-07-02 at 16:41 -0700, Richard Henderson wrote:
> While looking into Zoltan's attempt to speed up ppc64 DCBZ
> (data cache block set to zero), I wondered what AArch64 was
> doing differently.  It turned out that Arm is the only user
> of tlb_vaddr_to_host.
> 
> None of the code sequences in use between AArch64, Power64 and S390X
> are 100% safe, with race conditions vs mmap et al, however, AArch64
> is the only one that will fail this single threaded test case.  Use
> of these new functions fixes the race condition as well, though I
> have not yet touched the other guests.
> 
> I thought about exposing accel/tcg/user-retaddr.h for direct use
> from the targets, but perhaps these wrappers are cleaner.  RFC?
> 
> 
> r~
> 
> 
> Richard Henderson (2):
>   accel/tcg: Introduce memset_ra, memmove_ra
>   target/arm: Use memset_ra, memmove_ra in helper-a64.c
> 
>  include/exec/cpu_ldst.h            | 40 ++++++++++++++++
>  accel/tcg/user-exec.c              | 22 +++++++++
>  target/arm/tcg/helper-a64.c        | 10 ++--
>  tests/tcg/multiarch/memset-fault.c | 77
> ++++++++++++++++++++++++++++++
>  4 files changed, 144 insertions(+), 5 deletions(-)
>  create mode 100644 tests/tcg/multiarch/memset-fault.c

This sounds good to me.

I haven't debugged it, but I wonder why doesn't s390x fail here.
For XC with src == dst, it does access_memset() -> do_access_memset()
-> memset() without setting the RA. And I don't think that anything
around it sets the RA either.


  parent reply	other threads:[~2024-07-04 14:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 23:41 [PATCH 0/2] target/arm: Fix unwind from dc zva and FEAT_MOPS Richard Henderson
2024-07-02 23:41 ` [PATCH 1/2] accel/tcg: Introduce memset_ra, memmove_ra Richard Henderson
2024-07-08 14:31   ` Peter Maydell
2024-07-02 23:41 ` [PATCH 2/2] target/arm: Use memset_ra, memmove_ra in helper-a64.c Richard Henderson
2024-07-08 14:33   ` Peter Maydell
2024-07-04 14:50 ` Ilya Leoshkevich [this message]
2024-07-04 15:18   ` [PATCH 0/2] target/arm: Fix unwind from dc zva and FEAT_MOPS Richard Henderson
2024-07-04 21:48     ` Richard Henderson
2024-07-05 17:24       ` Ilya Leoshkevich
2024-07-08 14:25 ` Peter Maydell
2024-07-09 16:17   ` Richard Henderson

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=13b19a4859e25274d05663bc0ca05621c56af985.camel@linux.ibm.com \
    --to=iii@linux.ibm.com \
    --cc=balaton@eik.bme.hu \
    --cc=david@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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).