qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Anton Johansson" <anjo@rev.ng>, "Helge Deller" <deller@gmx.de>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 2/9] target/hppa: Have hppa_form_gva*() return vaddr type
Date: Thu,  9 Oct 2025 12:10:32 +0200	[thread overview]
Message-ID: <20251009101040.18378-3-philmd@linaro.org> (raw)
In-Reply-To: <20251009101040.18378-1-philmd@linaro.org>

Return a 'vaddr' type for "guest virtual address".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/hppa/cpu.h        | 4 ++--
 target/hppa/helper.c     | 4 ++--
 target/hppa/mem_helper.c | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h
index 869a75876e2..e14f238827b 100644
--- a/target/hppa/cpu.h
+++ b/target/hppa/cpu.h
@@ -320,7 +320,7 @@ void hppa_translate_code(CPUState *cs, TranslationBlock *tb,
 
 #define CPU_RESOLVING_TYPE TYPE_HPPA_CPU
 
-static inline target_ulong hppa_form_gva_mask(uint64_t gva_offset_mask,
+static inline vaddr hppa_form_gva_mask(uint64_t gva_offset_mask,
                                         uint64_t spc, target_ulong off)
 {
 #ifdef CONFIG_USER_ONLY
@@ -330,7 +330,7 @@ static inline target_ulong hppa_form_gva_mask(uint64_t gva_offset_mask,
 #endif
 }
 
-static inline target_ulong hppa_form_gva(CPUHPPAState *env, uint64_t spc,
+static inline vaddr hppa_form_gva(CPUHPPAState *env, uint64_t spc,
                                          target_ulong off)
 {
     return hppa_form_gva_mask(env->gva_offset_mask, spc, off);
diff --git a/target/hppa/helper.c b/target/hppa/helper.c
index d7f8495d982..edcd2bf27c8 100644
--- a/target/hppa/helper.c
+++ b/target/hppa/helper.c
@@ -148,8 +148,8 @@ void hppa_cpu_dump_state(CPUState *cs, FILE *f, int flags)
         m = UINT32_MAX;
     }
 
-    qemu_fprintf(f, "IA_F %08" PRIx64 ":%0*" PRIx64 " (" TARGET_FMT_lx ")\n"
-                    "IA_B %08" PRIx64 ":%0*" PRIx64 " (" TARGET_FMT_lx ")\n",
+    qemu_fprintf(f, "IA_F %08" PRIx64 ":%0*" PRIx64 " (0x%" VADDR_PRIx ")\n"
+                    "IA_B %08" PRIx64 ":%0*" PRIx64 " (0x%" VADDR_PRIx ")\n",
                  env->iasq_f >> 32, w, m & env->iaoq_f,
                  hppa_form_gva_mask(env->gva_offset_mask, env->iasq_f,
 				    env->iaoq_f),
diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c
index 9bdd0a6f23d..cce82e65999 100644
--- a/target/hppa/mem_helper.c
+++ b/target/hppa/mem_helper.c
@@ -803,7 +803,7 @@ void HELPER(diag_btlb)(CPUHPPAState *env)
 
 uint64_t HELPER(b_gate_priv)(CPUHPPAState *env, uint64_t iaoq_f)
 {
-    uint64_t gva = hppa_form_gva(env, env->iasq_f, iaoq_f);
+    vaddr gva = hppa_form_gva(env, env->iasq_f, iaoq_f);
     HPPATLBEntry *ent = hppa_find_tlb(env, gva);
 
     if (ent == NULL) {
-- 
2.51.0



  parent reply	other threads:[~2025-10-09 10:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-09 10:10 [PATCH 0/9] target/hppa: Remove use of MO_TE definition Philippe Mathieu-Daudé
2025-10-09 10:10 ` [PATCH 1/9] target/hppa: Use hwaddr type for HPPATLBEntry::pa Philippe Mathieu-Daudé
2025-10-09 16:54   ` Richard Henderson
2025-10-09 10:10 ` Philippe Mathieu-Daudé [this message]
2025-10-09 16:57   ` [PATCH 2/9] target/hppa: Have hppa_form_gva*() return vaddr type Richard Henderson
2025-10-09 10:10 ` [PATCH 3/9] target/hppa: Explode MO_TExx -> MO_TE | MO_xx Philippe Mathieu-Daudé
2025-10-09 16:58   ` Richard Henderson
2025-10-09 10:10 ` [PATCH 4/9] target/hppa: Conceal MO_TE within do_load() Philippe Mathieu-Daudé
2025-10-09 16:58   ` Richard Henderson
2025-10-09 10:10 ` [PATCH 5/9] target/hppa: Conceal MO_TE within do_load_32/64() Philippe Mathieu-Daudé
2025-10-09 16:59   ` Richard Henderson
2025-10-09 10:10 ` [PATCH 6/9] target/hppa: Conceal MO_TE within do_store() Philippe Mathieu-Daudé
2025-10-09 16:59   ` Richard Henderson
2025-10-09 10:10 ` [PATCH 7/9] target/hppa: Conceal MO_TE within do_store_32/64() Philippe Mathieu-Daudé
2025-10-09 16:59   ` Richard Henderson
2025-10-09 10:10 ` [PATCH 8/9] target/hppa: Introduce mo_endian() helper Philippe Mathieu-Daudé
2025-10-09 17:01   ` Richard Henderson
2025-10-09 10:10 ` [PATCH 9/9] target/hppa: Replace MO_TE -> MO_BE Philippe Mathieu-Daudé
2025-10-09 17:04   ` 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=20251009101040.18378-3-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=anjo@rev.ng \
    --cc=deller@gmx.de \
    --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).