From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, qemu-ppc@nongu.org, qemu-s390x@nongnu.org,
qemu-riscv@nongnu.org, balaton@eik.bme.hu, max.chou@sifive.com
Subject: [PATCH v2 00/13] Fixes for user-only munmap races
Date: Tue, 9 Jul 2024 20:28:01 -0700 [thread overview]
Message-ID: <20240710032814.104643-1-richard.henderson@linaro.org> (raw)
Supercedes: 20240702234155.2106399-1-richard.henderson@linaro.org
("[PATCH 0/2] target/arm: Fix unwind from dc zva and FEAT_MOPS")
Supercedes: 20240702234659.2106870-1-richard.henderson@linaro.org
("[PATCH 0/4] target/ppc: Cleanups for dcbz")
After looking at the first dc zva patch set again, I can see no
difference between the memset used by dc dva and the plain memory
accesses used by SVE and SME. In all cases it's a host memory
access that might fault even after probe_access, due to a race.
So I've dropped memset_ra and memmove_ra, and instead expose the
basic set/clear_helper_retaddr interface. This allows one set/clear
to cover entire loops, instead of trebling the overhead of each
individual access.
I've included the ppc dcbz cleanups, so that the final improvement
applies cleanly.
I've updated s390x, though it isn't as clean as I would like.
I've tidied the riscv use of tlb_vaddr_to_host, which Peter noticed.
The usage was incorrect in general. There is no race condition
here because it still uses cpu_ld*_data_ra in the end and not a
bare host memory access. But the ongoing work to improve riscv
vector memory instructions should take note.
r~
BALATON Zoltan (1):
target/ppc/mem_helper.c: Remove a conditional from dcbz_common()
Richard Henderson (12):
accel/tcg: Move {set,clear}_helper_retaddr to cpu_ldst.h
target/arm: Use cpu_env in cpu_untagged_addr
target/arm: Use set/clear_helper_retaddr in helper-a64.c
target/arm: Use set/clear_helper_retaddr in SVE and SME helpers
target/ppc: Hoist dcbz_size out of dcbz_common
target/ppc: Split out helper_dbczl for 970
target/ppc: Merge helper_{dcbz,dcbzep}
target/ppc: Improve helper_dcbz for user-only
target/s390x: Use user_or_likely in do_access_memset
target/s390x: Use user_or_likely in access_memmove
target/s390x: Use set/clear_helper_retaddr in mem_helper.c
target/riscv: Simplify probing in vext_ldff
accel/tcg/user-retaddr.h | 28 ---------
include/exec/cpu_ldst.h | 34 +++++++++++
target/arm/cpu.h | 4 +-
target/ppc/helper.h | 6 +-
accel/tcg/cpu-exec.c | 3 -
accel/tcg/user-exec.c | 1 -
target/arm/tcg/helper-a64.c | 14 ++++-
target/arm/tcg/sme_helper.c | 16 ++++++
target/arm/tcg/sve_helper.c | 26 +++++++++
target/ppc/mem_helper.c | 51 +++++++++--------
target/ppc/translate.c | 24 ++++----
target/riscv/vector_helper.c | 34 +++++------
target/s390x/tcg/mem_helper.c | 103 +++++++++++++++++++++-------------
13 files changed, 219 insertions(+), 125 deletions(-)
delete mode 100644 accel/tcg/user-retaddr.h
--
2.43.0
next reply other threads:[~2024-07-10 3:31 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-10 3:28 Richard Henderson [this message]
2024-07-10 3:28 ` [PATCH v2 01/13] accel/tcg: Move {set, clear}_helper_retaddr to cpu_ldst.h Richard Henderson
2024-07-12 12:48 ` Peter Maydell
2024-07-10 3:28 ` [PATCH v2 02/13] target/arm: Use cpu_env in cpu_untagged_addr Richard Henderson
2024-07-12 12:49 ` Peter Maydell
2024-07-10 3:28 ` [PATCH v2 03/13] target/arm: Use set/clear_helper_retaddr in helper-a64.c Richard Henderson
2024-07-12 12:53 ` Peter Maydell
2024-07-10 3:28 ` [PATCH v2 04/13] target/arm: Use set/clear_helper_retaddr in SVE and SME helpers Richard Henderson
2024-07-12 13:00 ` Peter Maydell
2024-07-10 3:28 ` [PATCH v2 05/13] target/ppc/mem_helper.c: Remove a conditional from dcbz_common() Richard Henderson
2024-07-10 3:28 ` [PATCH v2 06/13] target/ppc: Hoist dcbz_size out of dcbz_common Richard Henderson
2024-07-10 12:11 ` BALATON Zoltan
2024-07-10 14:36 ` Richard Henderson
2024-07-10 3:28 ` [PATCH v2 07/13] target/ppc: Split out helper_dbczl for 970 Richard Henderson
2024-07-10 12:17 ` BALATON Zoltan
2024-07-10 3:28 ` [PATCH v2 08/13] target/ppc: Merge helper_{dcbz,dcbzep} Richard Henderson
2024-07-10 12:20 ` BALATON Zoltan
2024-07-10 14:41 ` Richard Henderson
2024-07-10 3:28 ` [PATCH v2 09/13] target/ppc: Improve helper_dcbz for user-only Richard Henderson
2024-07-10 12:25 ` BALATON Zoltan
2024-07-10 14:42 ` Richard Henderson
2024-07-10 3:28 ` [PATCH v2 10/13] target/s390x: Use user_or_likely in do_access_memset Richard Henderson
2024-07-12 13:02 ` Peter Maydell
2024-07-10 3:28 ` [PATCH v2 11/13] target/s390x: Use user_or_likely in access_memmove Richard Henderson
2024-07-10 3:28 ` [PATCH v2 12/13] target/s390x: Use set/clear_helper_retaddr in mem_helper.c Richard Henderson
2024-07-10 3:28 ` [PATCH v2 13/13] target/riscv: Simplify probing in vext_ldff Richard Henderson
2024-07-10 4:09 ` Alistair Francis
2024-07-15 7:06 ` Max Chou
2024-07-15 21:42 ` 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=20240710032814.104643-1-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=balaton@eik.bme.hu \
--cc=max.chou@sifive.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongu.org \
--cc=qemu-riscv@nongnu.org \
--cc=qemu-s390x@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).