qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] target/hppa: fix building gva for wide mode


From: Richard Henderson
Subject: Re: [PATCH 3/3] target/hppa: fix building gva for wide mode
Date: Sun, 24 Mar 2024 07:20:39 -1000
User-agent: Mozilla Thunderbird

On 3/23/24 22:09, Sven Schnelle wrote:
64 Bit hppa no longer has a fixed 32/32 bit split between space and
offset. Instead it uses 42 bits for the offset. The lower 10 bits of
the space are always zero, leaving 22 bits actually used. Simply or
the values together to build the gva.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
  target/hppa/mem_helper.c | 13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c
index 84785b5a5c..6f895fced7 100644
--- a/target/hppa/mem_helper.c
+++ b/target/hppa/mem_helper.c
@@ -523,13 +523,16 @@ void HELPER(itlbp_pa11)(CPUHPPAState *env, target_ulong 
addr, target_ulong reg)
  }
static void itlbt_pa20(CPUHPPAState *env, target_ulong r1,
-                       target_ulong r2, vaddr va_b)
+                       target_ulong r2, uint64_t spc, uint64_t off)
  {
      HPPATLBEntry *ent;
-    vaddr va_e;
+    vaddr va_b, va_e;
      uint64_t va_size;
      int mask_shift;
+ va_b = off & gva_offset_mask(env->psw);
+    va_b |= spc << 32;

Indeed, this ought to be using

    va_b = hppa_form_gva_psw(env->psw, off, spc << 32);

With that,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]