From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: foss@percivaleng.com, qemu-ppc@nongnu.org
Subject: Re: [PATCH 08/12] target/ppc: Fill in TCGCPUOps.pointer_wrap
Date: Mon, 5 May 2025 18:50:49 +0200 [thread overview]
Message-ID: <e59a8b0f-7342-4fa7-aec5-98aebd2fa70b@linaro.org> (raw)
In-Reply-To: <20250504205714.3432096-9-richard.henderson@linaro.org>
On 4/5/25 22:57, Richard Henderson wrote:
> Check 32 vs 64-bit state.
>
> Cc: qemu-ppc@nongnu.org
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/ppc/cpu_init.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
> index cf88a18244..1f18967b62 100644
> --- a/target/ppc/cpu_init.c
> +++ b/target/ppc/cpu_init.c
> @@ -7386,6 +7386,12 @@ static void ppc_cpu_exec_exit(CPUState *cs)
> cpu->vhyp_class->cpu_exec_exit(cpu->vhyp, cpu);
> }
> }
> +
> +static vaddr ppc_pointer_wrap(CPUState *cs, int mmu_idx,
> + vaddr result, vaddr base)
> +{
> + return (cpu_env(cs)->hflags >> HFLAGS_64) & 1 ? result : (uint32_t)result;
Alternatively expose and use NARROW_MODE().
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> +}
> #endif /* CONFIG_TCG */
>
> #endif /* !CONFIG_USER_ONLY */
> @@ -7490,6 +7496,7 @@ static const TCGCPUOps ppc_tcg_ops = {
> .record_sigsegv = ppc_cpu_record_sigsegv,
> #else
> .tlb_fill = ppc_cpu_tlb_fill,
> + .pointer_wrap = ppc_pointer_wrap,
> .cpu_exec_interrupt = ppc_cpu_exec_interrupt,
> .cpu_exec_halt = ppc_cpu_has_work,
> .cpu_exec_reset = cpu_reset,
next prev parent reply other threads:[~2025-05-05 16:51 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-04 20:57 [PATCH 00/12] accel/tcg: Fix cross-page pointer wrapping issue Richard Henderson
2025-05-04 20:57 ` [PATCH 01/12] accel/tcg: Add TCGCPUOps.pointer_wrap Richard Henderson
2025-05-05 9:26 ` Philippe Mathieu-Daudé
2025-05-04 20:57 ` [PATCH 02/12] target: Use cpu_pointer_wrap_notreached for strict align targets Richard Henderson
2025-05-05 9:26 ` Philippe Mathieu-Daudé
2025-05-04 20:57 ` [PATCH 03/12] target: Use cpu_pointer_wrap_uint32 for 32-bit targets Richard Henderson
2025-05-05 9:26 ` Philippe Mathieu-Daudé
2025-05-05 11:34 ` Edgar E. Iglesias
2025-05-08 6:40 ` Bastian Koppelmann
2025-05-04 20:57 ` [PATCH 04/12] target/arm: Fill in TCGCPUOps.pointer_wrap Richard Henderson
2025-05-05 14:29 ` Philippe Mathieu-Daudé
2025-05-26 18:21 ` Philippe Mathieu-Daudé
2025-05-27 7:33 ` Richard Henderson
2025-05-04 20:57 ` [PATCH 05/12] target/i386: " Richard Henderson
2025-05-05 16:52 ` Philippe Mathieu-Daudé
2025-05-04 20:57 ` [PATCH 06/12] target/loongarch: " Richard Henderson
2025-05-26 18:17 ` Philippe Mathieu-Daudé
2025-05-27 0:57 ` Bibo Mao
2025-05-27 4:04 ` gaosong
2025-05-04 20:57 ` [PATCH 07/12] target/mips: " Richard Henderson
2025-05-05 14:30 ` Philippe Mathieu-Daudé
2025-05-05 14:59 ` Philippe Mathieu-Daudé
2025-05-04 20:57 ` [PATCH 08/12] target/ppc: " Richard Henderson
2025-05-05 14:32 ` Philippe Mathieu-Daudé
2025-05-05 16:50 ` Philippe Mathieu-Daudé [this message]
2025-05-05 19:00 ` Richard Henderson
2025-05-04 20:57 ` [PATCH 09/12] target/riscv: " Richard Henderson
2025-05-05 16:47 ` Philippe Mathieu-Daudé
2025-05-05 18:59 ` Richard Henderson
2025-05-26 18:15 ` Philippe Mathieu-Daudé
2025-05-19 0:17 ` Alistair Francis
2025-05-04 20:57 ` [PATCH 10/12] target/s390x: " Richard Henderson
2025-05-05 14:41 ` Philippe Mathieu-Daudé
2025-05-05 16:16 ` Richard Henderson
2025-05-26 18:16 ` Philippe Mathieu-Daudé
2025-05-04 20:57 ` [PATCH 11/12] target/sparc: " Richard Henderson
2025-05-05 14:54 ` Philippe Mathieu-Daudé
2025-05-05 16:16 ` Richard Henderson
2025-05-04 20:57 ` [PATCH 12/12] accel/tcg: Assert TCGCPUOps.pointer_wrap is set Richard Henderson
2025-05-05 9:27 ` Philippe Mathieu-Daudé
2025-05-07 16:38 ` [PATCH 00/12] accel/tcg: Fix cross-page pointer wrapping issue FOSS
2025-05-07 17:32 ` 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=e59a8b0f-7342-4fa7-aec5-98aebd2fa70b@linaro.org \
--to=philmd@linaro.org \
--cc=foss@percivaleng.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.