From: Anton Johansson via <qemu-devel@nongnu.org>
To: qemu-devel@nongnu.org
Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com,
eduardo@habkost.net, philmd@linaro.org,
marcel.apfelbaum@gmail.com, wangyanan55@huawei.com
Subject: [PATCH 5/8] accel/tcg: Replace target_ulong with vaddr in translator_*()
Date: Thu, 20 Apr 2023 23:28:47 +0200 [thread overview]
Message-ID: <20230420212850.20400-6-anjo@rev.ng> (raw)
In-Reply-To: <20230420212850.20400-1-anjo@rev.ng>
Use vaddr for guest virtual address in translator_use_goto_tb() and
translator_loop().
Signed-off-by: Anton Johansson <anjo@rev.ng>
---
accel/tcg/translator.c | 10 +++++-----
include/exec/translator.h | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c
index 7bda43ff61..58737eff97 100644
--- a/accel/tcg/translator.c
+++ b/accel/tcg/translator.c
@@ -18,7 +18,7 @@
#include "exec/plugin-gen.h"
#include "exec/replay-core.h"
-bool translator_use_goto_tb(DisasContextBase *db, target_ulong dest)
+bool translator_use_goto_tb(DisasContextBase *db, vaddr dest)
{
/* Suppress goto_tb if requested. */
if (tb_cflags(db->tb) & CF_NO_GOTO_TB) {
@@ -30,8 +30,8 @@ bool translator_use_goto_tb(DisasContextBase *db, target_ulong dest)
}
void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns,
- target_ulong pc, void *host_pc,
- const TranslatorOps *ops, DisasContextBase *db)
+ vaddr pc, void *host_pc, const TranslatorOps *ops,
+ DisasContextBase *db)
{
uint32_t cflags = tb_cflags(tb);
bool plugin_enabled;
@@ -137,10 +137,10 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns,
}
static void *translator_access(CPUArchState *env, DisasContextBase *db,
- target_ulong pc, size_t len)
+ vaddr pc, size_t len)
{
void *host;
- target_ulong base, end;
+ vaddr base, end;
TranslationBlock *tb;
tb = db->tb;
diff --git a/include/exec/translator.h b/include/exec/translator.h
index 797fef7515..fa3c2ba529 100644
--- a/include/exec/translator.h
+++ b/include/exec/translator.h
@@ -147,8 +147,8 @@ typedef struct TranslatorOps {
* - When too many instructions have been translated.
*/
void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns,
- target_ulong pc, void *host_pc,
- const TranslatorOps *ops, DisasContextBase *db);
+ vaddr pc, void *host_pc, const TranslatorOps *ops,
+ DisasContextBase *db);
/**
* translator_use_goto_tb
@@ -158,7 +158,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns,
* Return true if goto_tb is allowed between the current TB
* and the destination PC.
*/
-bool translator_use_goto_tb(DisasContextBase *db, target_ulong dest);
+bool translator_use_goto_tb(DisasContextBase *db, vaddr dest);
/*
* Translator Load Functions
--
2.39.1
next prev parent reply other threads:[~2023-04-20 21:32 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 21:28 [PATCH 0/8] Start replacing target_ulong with vaddr Anton Johansson via
2023-04-20 21:28 ` [PATCH 1/8] accel: Replace `target_ulong` with `vaddr` in TB/TLB Anton Johansson via
2023-04-23 9:09 ` Richard Henderson
2023-04-24 12:47 ` Anton Johansson via
2023-04-20 21:28 ` [PATCH 2/8] accel: Replace target_ulong with vaddr in probe_*() Anton Johansson via
2023-04-23 9:09 ` Richard Henderson
2023-04-20 21:28 ` [PATCH 3/8] accel/tcg: Replace target_ulong with vaddr in *_mmu_lookup() Anton Johansson via
2023-04-23 9:10 ` Richard Henderson
2023-04-20 21:28 ` [PATCH 4/8] accel/tcg: Replace target_ulong with vaddr in helper_unaligned_*() Anton Johansson via
2023-04-23 9:10 ` Richard Henderson
2023-04-24 12:48 ` Anton Johansson via
2023-04-20 21:28 ` Anton Johansson via [this message]
2023-04-23 9:11 ` [PATCH 5/8] accel/tcg: Replace target_ulong with vaddr in translator_*() Richard Henderson
2023-04-20 21:28 ` [PATCH 6/8] accel/tcg: Replace target_ulong with vaddr in page_*() Anton Johansson via
2023-04-23 9:13 ` Richard Henderson
2023-04-24 12:51 ` Anton Johansson via
2023-04-24 13:10 ` Richard Henderson
2023-04-20 21:28 ` [PATCH 7/8] cpu: Replace target_ulong with vaddr in tb_invalidate_phys_addr() Anton Johansson via
2023-04-23 9:14 ` Richard Henderson
2023-04-23 17:29 ` Philippe Mathieu-Daudé
2023-04-23 18:46 ` Richard Henderson
2023-04-23 19:35 ` Alex Bennée
2023-04-23 19:42 ` Richard Henderson
2023-04-24 12:52 ` Anton Johansson via
2023-04-24 15:19 ` Philippe Mathieu-Daudé
2023-04-20 21:28 ` [PATCH 8/8] tcg: Replace target_ulong with vaddr in tcg_gen_code() Anton Johansson via
2023-04-23 9:15 ` Richard Henderson
2023-04-23 10:59 ` [PATCH 0/8] Start replacing target_ulong with vaddr Richard Henderson
2023-04-24 12:37 ` Anton Johansson via
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=20230420212850.20400-6-anjo@rev.ng \
--to=qemu-devel@nongnu.org \
--cc=ale@rev.ng \
--cc=anjo@rev.ng \
--cc=eduardo@habkost.net \
--cc=marcel.apfelbaum@gmail.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=richard.henderson@linaro.org \
--cc=wangyanan55@huawei.com \
/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).