qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Anton Johansson" <anjo@rev.ng>
Subject: Re: [RFC PATCH-for-10.1 4/4] tcg: Define guest_default_memory_order in TCGCPUOps
Date: Fri, 21 Mar 2025 14:20:08 +0100	[thread overview]
Message-ID: <915c5266-bf73-43aa-b0ff-80bd094e4d0b@linaro.org> (raw)
In-Reply-To: <20250321125737.72839-5-philmd@linaro.org>

On 21/3/25 13:57, Philippe Mathieu-Daudé wrote:
> Add the TCGCPUOps::guest_default_memory_order field and have
> each target initialize it.
> 
> Use it to set TCGContext::guest_mo in tb_gen_code(), removing
> the need for the TCG_GUEST_DEFAULT_MO definition.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/accel/tcg/cpu-ops.h   |  8 ++++++++
>   target/alpha/cpu-param.h      |  3 ---
>   target/arm/cpu-param.h        |  3 ---
>   target/avr/cpu-param.h        |  2 --
>   target/hexagon/cpu-param.h    |  3 ---
>   target/hppa/cpu-param.h       |  8 --------
>   target/i386/cpu-param.h       |  3 ---
>   target/loongarch/cpu-param.h  |  2 --
>   target/m68k/cpu-param.h       |  3 ---
>   target/microblaze/cpu-param.h |  3 ---
>   target/mips/cpu-param.h       |  2 --
>   target/openrisc/cpu-param.h   |  2 --
>   target/ppc/cpu-param.h        |  2 --
>   target/riscv/cpu-param.h      |  2 --
>   target/rx/cpu-param.h         |  3 ---
>   target/s390x/cpu-param.h      |  6 ------
>   target/sh4/cpu-param.h        |  3 ---
>   target/sparc/cpu-param.h      | 23 -----------------------
>   target/tricore/cpu-param.h    |  3 ---
>   target/xtensa/cpu-param.h     |  3 ---
>   accel/tcg/translate-all.c     |  2 +-
>   target/alpha/cpu.c            |  3 +++
>   target/arm/cpu.c              |  3 +++
>   target/arm/tcg/cpu-v7m.c      |  3 +++
>   target/avr/cpu.c              |  1 +
>   target/hexagon/cpu.c          |  2 ++
>   target/hppa/cpu.c             |  8 ++++++++
>   target/i386/tcg/tcg-cpu.c     |  5 +++++
>   target/loongarch/cpu.c        |  2 ++
>   target/m68k/cpu.c             |  3 +++
>   target/microblaze/cpu.c       |  3 +++
>   target/mips/cpu.c             |  2 ++
>   target/openrisc/cpu.c         |  2 ++
>   target/ppc/cpu_init.c         |  2 ++
>   target/riscv/tcg/tcg-cpu.c    |  2 ++
>   target/rx/cpu.c               |  3 +++
>   target/s390x/cpu.c            |  6 ++++++
>   target/sh4/cpu.c              |  3 +++
>   target/sparc/cpu.c            | 23 +++++++++++++++++++++++
>   target/tricore/cpu.c          |  2 ++
>   target/xtensa/cpu.c           |  3 +++
>   41 files changed, 90 insertions(+), 80 deletions(-)

Missing one TCG_GUEST_DEFAULT_MO mention in docs:

-- >8 --
diff --git a/docs/devel/multi-thread-tcg.rst 
b/docs/devel/multi-thread-tcg.rst
index b0f473961dd..14a2a9dc7b5 100644
--- a/docs/devel/multi-thread-tcg.rst
+++ b/docs/devel/multi-thread-tcg.rst
@@ -31,2 +31,2 @@ combinations where the host memory model is able to 
accommodate the
-guest (TCG_GUEST_DEFAULT_MO & ~TCG_TARGET_DEFAULT_MO is zero) and the
-guest has had the required work done to support this safely
+guest (TCGCPUOps::guest_default_memory_order & ~TCG_TARGET_DEFAULT_MO 
is zero)
+and the guest has had the required work done to support this safely
---


  reply	other threads:[~2025-03-21 13:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21 12:57 [RFC PATCH-for-10.1 0/4] tcg: Move TCG_GUEST_DEFAULT_MO -> TCGCPUOps::guest_default_memory_order Philippe Mathieu-Daudé
2025-03-21 12:57 ` [PATCH-for-10.1 1/4] tcg: Always define TCG_GUEST_DEFAULT_MO Philippe Mathieu-Daudé
2025-03-21 14:39   ` Anton Johansson via
2025-03-21 15:14   ` Richard Henderson
2025-03-21 17:44   ` Pierrick Bouvier
2025-03-21 12:57 ` [PATCH-for-10.1 2/4] tcg: Simplify tcg_req_mo() macro Philippe Mathieu-Daudé
2025-03-21 14:40   ` Anton Johansson via
2025-03-21 15:14   ` Richard Henderson
2025-03-21 17:44   ` Pierrick Bouvier
2025-03-21 12:57 ` [RFC PATCH-for-10.1 3/4] tcg: Have tcg_req_mo() use runtime TCGContext::guest_mo Philippe Mathieu-Daudé
2025-03-21 14:39   ` Anton Johansson via
2025-03-21 14:46     ` Philippe Mathieu-Daudé
2025-03-21 15:16   ` Richard Henderson
2025-03-21 12:57 ` [RFC PATCH-for-10.1 4/4] tcg: Define guest_default_memory_order in TCGCPUOps Philippe Mathieu-Daudé
2025-03-21 13:20   ` Philippe Mathieu-Daudé [this message]
2025-03-21 14:34   ` Anton Johansson via
2025-03-21 15:25   ` Richard Henderson
2025-03-21 17:47   ` Pierrick Bouvier
2025-03-21 14:40 ` [RFC PATCH-for-10.1 0/4] tcg: Move TCG_GUEST_DEFAULT_MO -> TCGCPUOps::guest_default_memory_order Anton Johansson via

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=915c5266-bf73-43aa-b0ff-80bd094e4d0b@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=anjo@rev.ng \
    --cc=pbonzini@redhat.com \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@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).