qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: foss@percivaleng.com, qemu-s390x@nongnu.org
Subject: Re: [PATCH 10/12] target/s390x: Fill in TCGCPUOps.pointer_wrap
Date: Mon, 5 May 2025 09:16:16 -0700	[thread overview]
Message-ID: <aa4579d9-4e15-409a-9cf9-232b94aa7f7d@linaro.org> (raw)
In-Reply-To: <9aebfbbc-ff29-4af7-8afe-8e0d82c62557@linaro.org>

On 5/5/25 07:41, Philippe Mathieu-Daudé wrote:
> On 4/5/25 22:57, Richard Henderson wrote:
>> Use the existing wrap_address function.
>>
>> Cc: qemu-s390x@nongnu.org
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>   target/s390x/cpu.c | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
>> index 9c1158ebcc..f05ce317da 100644
>> --- a/target/s390x/cpu.c
>> +++ b/target/s390x/cpu.c
>> @@ -347,6 +347,14 @@ static TCGTBCPUState s390x_get_tb_cpu_state(CPUState *cs)
>>       };
>>   }
>> +#ifndef CONFIG_USER_ONLY
>> +static vaddr s390_pointer_wrap(CPUState *cs, int mmu_idx,
>> +                               vaddr result, vaddr base)
>> +{
>> +    return wrap_address(cpu_env(cs), result);
>> +}
>> +#endif
>> +
>>   static const TCGCPUOps s390_tcg_ops = {
>>       .mttcg_supported = true,
>>       .precise_smc = true,
>> @@ -367,6 +375,7 @@ static const TCGCPUOps s390_tcg_ops = {
>>       .record_sigbus = s390_cpu_record_sigbus,
>>   #else
>>       .tlb_fill = s390_cpu_tlb_fill,
>> +    .pointer_wrap = s390_pointer_wrap,
> 
> As future cleanup, we might now remove the wrap_address() calls
> in target/s390x/tcg/crypto_helper.c, and target/s390x/tcg/vec_helper.c,
> is that correct?
> 
> Also some uses in target/s390x/tcg/mem_helper.c.

No, not correct.

The new pointer_wrap hook is only used for unaligned accesses that cross page boundaries. 
It does not apply to a sequence of individual accesses like we have in the s390x helpers.


r~


  reply	other threads:[~2025-05-05 16:16 UTC|newest]

Thread overview: 39+ 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-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:59   ` Philippe Mathieu-Daudé
2025-05-04 20:57 ` [PATCH 08/12] target/ppc: " Richard Henderson
2025-05-05 16:50   ` Philippe Mathieu-Daudé
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 [this message]
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=aa4579d9-4e15-409a-9cf9-232b94aa7f7d@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=foss@percivaleng.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@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).