[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-9.1 09/12] accel/tcg/internal: Check for USER_ONLY definition
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-9.1 09/12] accel/tcg/internal: Check for USER_ONLY definition instead of SOFTMMU |
Date: |
Wed, 13 Mar 2024 22:33:36 +0100 |
Since we *might* have user emulation with softmmu,
replace the system emulation check by !user emulation one.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
accel/tcg/internal-target.h | 6 +++---
accel/tcg/tb-hash.h | 4 ++--
accel/tcg/tcg-all.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h
index 4e36cf858e..b22b29c461 100644
--- a/accel/tcg/internal-target.h
+++ b/accel/tcg/internal-target.h
@@ -24,7 +24,7 @@
#define assert_memory_lock()
#endif
-#if defined(CONFIG_SOFTMMU) && defined(CONFIG_DEBUG_TCG)
+#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_DEBUG_TCG)
void assert_no_pages_locked(void);
#else
static inline void assert_no_pages_locked(void) { }
@@ -62,12 +62,12 @@ void tb_unlock_page1(tb_page_addr_t, tb_page_addr_t);
void tb_unlock_pages(TranslationBlock *);
#endif
-#ifdef CONFIG_SOFTMMU
+#ifndef CONFIG_USER_ONLY
void tb_invalidate_phys_range_fast(ram_addr_t ram_addr,
unsigned size,
uintptr_t retaddr);
G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr);
-#endif /* CONFIG_SOFTMMU */
+#endif /* !CONFIG_USER_ONLY */
TranslationBlock *tb_gen_code(CPUState *cpu, vaddr pc,
uint64_t cs_base, uint32_t flags,
diff --git a/accel/tcg/tb-hash.h b/accel/tcg/tb-hash.h
index a0c61f25cd..45a484ce82 100644
--- a/accel/tcg/tb-hash.h
+++ b/accel/tcg/tb-hash.h
@@ -25,7 +25,7 @@
#include "qemu/xxhash.h"
#include "tb-jmp-cache.h"
-#ifdef CONFIG_SOFTMMU
+#ifndef CONFIG_USER_ONLY
/* Only the bottom TB_JMP_PAGE_BITS of the jump cache hash bits vary for
addresses on the same page. The top bits are the same. This allows
@@ -58,7 +58,7 @@ static inline unsigned int tb_jmp_cache_hash_func(vaddr pc)
return (pc ^ (pc >> TB_JMP_CACHE_BITS)) & (TB_JMP_CACHE_SIZE - 1);
}
-#endif /* CONFIG_SOFTMMU */
+#endif /* CONFIG_USER_ONLY */
static inline
uint32_t tb_hash_func(tb_page_addr_t phys_pc, vaddr pc,
diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
index c6619f5b98..929af1f64c 100644
--- a/accel/tcg/tcg-all.c
+++ b/accel/tcg/tcg-all.c
@@ -116,7 +116,7 @@ static int tcg_init_machine(MachineState *ms)
tb_htable_init();
tcg_init(s->tb_size * MiB, s->splitwx_enabled, max_cpus);
-#if defined(CONFIG_SOFTMMU)
+#if !defined(CONFIG_USER_ONLY)
/*
* There's no guest base to take into account, so go ahead and
* initialize the prologue now.
--
2.41.0
- [PATCH-for-9.0? 05/12] target/ppc: Rename init_excp_4xx_softmmu() -> init_excp_4xx(), (continued)
- [PATCH-for-9.0? 05/12] target/ppc: Rename init_excp_4xx_softmmu() -> init_excp_4xx(), Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.1 06/12] tcg/sparc64: Check for USER_ONLY definition instead of SOFTMMU one, Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.0? 04/12] gdbstub/system: Rename 'user_ctx' argument as 'ctx', Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.1 07/12] plugins/api: Check for USER_ONLY definition instead of SOFTMMU one, Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.0? 08/12] accel/tcg/tb-maint: Add comments around system emulation, Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.1 09/12] accel/tcg/internal: Check for USER_ONLY definition instead of SOFTMMU,
Philippe Mathieu-Daudé <=
- [PATCH-for-9.1 10/12] exec/cpu-defs: Restrict SOFTMMU specific definitions to accel/tcg/, Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.1 11/12] tcg: Remove unused CONFIG_SOFTMMU definition from libtcg_system.fa, Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.1 12/12] exec/poison: Poison CONFIG_SOFTMMU again, Philippe Mathieu-Daudé, 2024/03/13