[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 31/48] exec-all: Widen TranslationBlock pc and cs_base to 64-b
|
From: |
Richard Henderson |
|
Subject: |
[PATCH v3 31/48] exec-all: Widen TranslationBlock pc and cs_base to 64-bits |
|
Date: |
Tue, 30 May 2023 21:03:13 -0700 |
This makes TranslationBlock agnostic to the address size of the guest.
Use vaddr for pc, since that's always a virtual address.
Use uint64_t for cs_base, since usage varies between guests.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/exec/exec-all.h | 4 ++--
accel/tcg/cpu-exec.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 0d00541aca..a09d754624 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -516,7 +516,7 @@ struct TranslationBlock {
* Unwind information is taken as offsets from the page, to be
* deposited into the "current" PC.
*/
- target_ulong pc;
+ vaddr pc;
/*
* Target-specific data associated with the TranslationBlock, e.g.:
@@ -525,7 +525,7 @@ struct TranslationBlock {
* s390x: instruction data for EXECUTE,
* sparc: the next pc of the instruction queue (for delay slots).
*/
- target_ulong cs_base;
+ uint64_t cs_base;
uint32_t flags; /* flags defining in which context the code was generated
*/
uint32_t cflags; /* compile flags */
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 0e741960da..f1eae7b8e5 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -302,7 +302,7 @@ static void log_cpu_exec(target_ulong pc, CPUState *cpu,
{
if (qemu_log_in_addr_range(pc)) {
qemu_log_mask(CPU_LOG_EXEC,
- "Trace %d: %p [" TARGET_FMT_lx
+ "Trace %d: %p [%08" PRIx64
"/" TARGET_FMT_lx "/%08x/%08x] %s\n",
cpu->cpu_index, tb->tc.ptr, tb->cs_base, pc,
tb->flags, tb->cflags, lookup_symbol(pc));
--
2.34.1
- [PATCH v3 37/48] target/arm: Tidy helpers for translation, (continued)
- [PATCH v3 37/48] target/arm: Tidy helpers for translation, Richard Henderson, 2023/05/31
- [PATCH v3 30/48] exec-all: Widen tb_page_addr_t for user-only, Richard Henderson, 2023/05/31
- [PATCH v3 35/48] accel/tcg: Introduce translator_io_start, Richard Henderson, 2023/05/31
- [PATCH v3 39/48] *: Add missing includes of exec/translation-block.h, Richard Henderson, 2023/05/31
- [PATCH v3 24/48] tcg: Split helper-proto.h, Richard Henderson, 2023/05/31
- [PATCH v3 25/48] tcg: Add insn_start_words to TCGContext, Richard Henderson, 2023/05/31
- [PATCH v3 11/48] tcg: Split out tcg-target-reg-bits.h, Richard Henderson, 2023/05/31
- [PATCH v3 29/48] tcg: Remove NO_CPU_IO_DEFS, Richard Henderson, 2023/05/31
- [PATCH v3 31/48] exec-all: Widen TranslationBlock pc and cs_base to 64-bits,
Richard Henderson <=
- [PATCH v3 28/48] tcg: Split tcg/tcg-op-gvec.h, Richard Henderson, 2023/05/31
- [PATCH v3 27/48] tcg: Move TLB_FLAGS_MASK check out of get_alignment_bits, Richard Henderson, 2023/05/31
- [PATCH v3 33/48] include/exec: Remove CODE_GEN_AVG_BLOCK_SIZE, Richard Henderson, 2023/05/31
- [PATCH v3 34/48] accel/tcg: Move most of gen-icount.h into translator.c, Richard Henderson, 2023/05/31
- [PATCH v3 36/48] accel/tcg: Move translator_fake_ldb out of line, Richard Henderson, 2023/05/31
- [PATCH v3 38/48] target/mips: Tidy helpers for translation, Richard Henderson, 2023/05/31
- [PATCH v3 48/48] tcg: Build once for system and once for user-only, Richard Henderson, 2023/05/31