[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 17/33] target: Make qemu_target_page_mask() available for *-user
From: |
Richard Henderson |
Subject: |
[PATCH 17/33] target: Make qemu_target_page_mask() available for *-user |
Date: |
Sun, 28 Jan 2024 14:41:57 +1000 |
From: Ilya Leoshkevich <iii@linux.ibm.com>
Currently qemu_target_page_mask() is usable only from the softmmu
code. Make it possible to use it from the *-user code as well.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-ID: <20231208003754.3688038-2-iii@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20240124075609.14756-2-philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
[rth: Split out change to accel/tcg/perf.c]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
system/physmem.c | 5 -----
target/target-common.c | 10 ++++++++++
target/meson.build | 2 ++
3 files changed, 12 insertions(+), 5 deletions(-)
create mode 100644 target/target-common.c
diff --git a/system/physmem.c b/system/physmem.c
index cc68a79763..5e66d9ae36 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -3431,11 +3431,6 @@ size_t qemu_target_page_size(void)
return TARGET_PAGE_SIZE;
}
-int qemu_target_page_mask(void)
-{
- return TARGET_PAGE_MASK;
-}
-
int qemu_target_page_bits(void)
{
return TARGET_PAGE_BITS;
diff --git a/target/target-common.c b/target/target-common.c
new file mode 100644
index 0000000000..903b10cfe4
--- /dev/null
+++ b/target/target-common.c
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+#include "qemu/osdep.h"
+
+#include "cpu.h"
+#include "exec/target_page.h"
+
+int qemu_target_page_mask(void)
+{
+ return TARGET_PAGE_MASK;
+}
diff --git a/target/meson.build b/target/meson.build
index a53a60486f..dee2ac47e0 100644
--- a/target/meson.build
+++ b/target/meson.build
@@ -19,3 +19,5 @@ subdir('sh4')
subdir('sparc')
subdir('tricore')
subdir('xtensa')
+
+specific_ss.add(files('target-common.c'))
--
2.34.1
- [PATCH 08/33] target: Uninline cpu_get_tb_cpu_state(), (continued)
- [PATCH 08/33] target: Uninline cpu_get_tb_cpu_state(), Richard Henderson, 2024/01/27
- [PATCH 10/33] include/exec: Move cpu_*()/cpu_env() to common header, Richard Henderson, 2024/01/27
- [PATCH 11/33] include/hw/core: Move do_interrupt in TCGCPUOps, Richard Henderson, 2024/01/27
- [PATCH 12/33] include/hw/core: Remove i386 conditional on fake_user_interrupt, Richard Henderson, 2024/01/27
- [PATCH 13/33] linux-user: Allow gdbstub to ignore page protection, Richard Henderson, 2024/01/27
- [PATCH 14/33] tests/tcg: Factor out gdbstub test functions, Richard Henderson, 2024/01/27
- [PATCH 15/33] tests/tcg: Add the PROT_NONE gdbstub test, Richard Henderson, 2024/01/27
- [PATCH 16/33] accel/tcg/cpu-exec: Use RCU_READ_LOCK_GUARD, Richard Henderson, 2024/01/27
- [PATCH 17/33] target: Make qemu_target_page_mask() available for *-user,
Richard Henderson <=
- [PATCH 18/33] accel/tcg: Make use of qemu_target_page_mask() in perf.c, Richard Henderson, 2024/01/27
- [PATCH 19/33] tcg: Make tb_cflags() usable from target-agnostic code, Richard Henderson, 2024/01/27
- [PATCH 20/33] accel/tcg: Remove #ifdef TARGET_I386 from perf.c, Richard Henderson, 2024/01/27
- [PATCH 21/33] accel/tcg: Move perf and debuginfo support to tcg/, Richard Henderson, 2024/01/27
- [PATCH 22/33] accel/tcg: Rename tcg_ss[] -> tcg_specific_ss[] in meson, Richard Henderson, 2024/01/27
- [PATCH 23/33] accel/tcg: Rename tcg_cpus_destroy() -> tcg_cpu_destroy(), Richard Henderson, 2024/01/27
- [PATCH 24/33] accel/tcg: Rename tcg_cpus_exec() -> tcg_cpu_exec(), Richard Henderson, 2024/01/27
- [PATCH 25/33] accel/tcg: Un-inline icount_exit_request() for clarity, Richard Henderson, 2024/01/27
- [PATCH 26/33] include/qemu: Add TCGCPUOps typedef to typedefs.h, Richard Henderson, 2024/01/27