qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/arm: Fix physical address resolution for MTE
@ 2023-01-14  3:12 Richard Henderson
  2023-01-17 16:35 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Henderson @ 2023-01-14  3:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: idan.horowitz, qemu-arm

Conversion to probe_access_full missed applying the page offset.

Fixes: b8967ddf ("target/arm: Use probe_access_full for MTE")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1416
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/mte_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c
index 86b3754838..98bcf59c22 100644
--- a/target/arm/mte_helper.c
+++ b/target/arm/mte_helper.c
@@ -142,7 +142,7 @@ static uint8_t *allocation_tag_mem(CPUARMState *env, int ptr_mmu_idx,
      * Remember these values across the second lookup below,
      * which may invalidate this pointer via tlb resize.
      */
-    ptr_paddr = full->phys_addr;
+    ptr_paddr = full->phys_addr | (ptr & ~TARGET_PAGE_MASK);
     attrs = full->attrs;
     full = NULL;
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] target/arm: Fix physical address resolution for MTE
  2023-01-14  3:12 [PATCH] target/arm: Fix physical address resolution for MTE Richard Henderson
@ 2023-01-17 16:35 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2023-01-17 16:35 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel, idan.horowitz, qemu-arm

On Sat, 14 Jan 2023 at 03:12, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Conversion to probe_access_full missed applying the page offset.
>
> Fixes: b8967ddf ("target/arm: Use probe_access_full for MTE")
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1416
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/mte_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>



Applied to target-arm.next, thanks.

-- PMM


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-17 16:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-14  3:12 [PATCH] target/arm: Fix physical address resolution for MTE Richard Henderson
2023-01-17 16:35 ` Peter Maydell

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).