[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/33] include/exec: Move PAGE_* macros to common header
|
From: |
Richard Henderson |
|
Subject: |
[PATCH 09/33] include/exec: Move PAGE_* macros to common header |
|
Date: |
Sun, 28 Jan 2024 14:41:49 +1000 |
From: Anton Johansson <anjo@rev.ng>
These don't vary across targets and are used in soon-to-be common code
(cputlb.c).
Signed-off-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20240119144024.14289-15-anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/exec/cpu-all.h | 24 ------------------------
include/exec/cpu-common.h | 30 ++++++++++++++++++++++++++++++
2 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 5340907cfd..edee87d3f4 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -171,34 +171,10 @@ extern const TargetPageBits target_page;
#define TARGET_PAGE_ALIGN(addr) ROUND_UP((addr), TARGET_PAGE_SIZE)
-/* same as PROT_xxx */
-#define PAGE_READ 0x0001
-#define PAGE_WRITE 0x0002
-#define PAGE_EXEC 0x0004
-#define PAGE_BITS (PAGE_READ | PAGE_WRITE | PAGE_EXEC)
-#define PAGE_VALID 0x0008
-/*
- * Original state of the write flag (used when tracking self-modifying code)
- */
-#define PAGE_WRITE_ORG 0x0010
-/*
- * Invalidate the TLB entry immediately, helpful for s390x
- * Low-Address-Protection. Used with PAGE_WRITE in tlb_set_page_with_attrs()
- */
-#define PAGE_WRITE_INV 0x0020
-/* For use with page_set_flags: page is being replaced; target_data cleared. */
-#define PAGE_RESET 0x0040
-/* For linux-user, indicates that the page is MAP_ANON. */
-#define PAGE_ANON 0x0080
-
#if defined(CONFIG_BSD) && defined(CONFIG_USER_ONLY)
/* FIXME: Code that sets/uses this is broken and needs to go away. */
#define PAGE_RESERVED 0x0100
#endif
-/* Target-specific bits that will be used via page_get_flags(). */
-#define PAGE_TARGET_1 0x0200
-#define PAGE_TARGET_2 0x0400
-
/*
* For linux-user, indicates that the page is mapped with the same semantics
* in both guest and host.
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index 1a8fad9222..ba10351576 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -219,4 +219,34 @@ G_NORETURN void cpu_loop_exit_atomic(CPUState *cpu,
uintptr_t pc);
G_NORETURN void cpu_loop_exit(CPUState *cpu);
G_NORETURN void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc);
+/* same as PROT_xxx */
+#define PAGE_READ 0x0001
+#define PAGE_WRITE 0x0002
+#define PAGE_EXEC 0x0004
+#define PAGE_BITS (PAGE_READ | PAGE_WRITE | PAGE_EXEC)
+#define PAGE_VALID 0x0008
+/*
+ * Original state of the write flag (used when tracking self-modifying code)
+ */
+#define PAGE_WRITE_ORG 0x0010
+/*
+ * Invalidate the TLB entry immediately, helpful for s390x
+ * Low-Address-Protection. Used with PAGE_WRITE in tlb_set_page_with_attrs()
+ */
+#define PAGE_WRITE_INV 0x0020
+/* For use with page_set_flags: page is being replaced; target_data cleared. */
+#define PAGE_RESET 0x0040
+/* For linux-user, indicates that the page is MAP_ANON. */
+#define PAGE_ANON 0x0080
+
+/* Target-specific bits that will be used via page_get_flags(). */
+#define PAGE_TARGET_1 0x0200
+#define PAGE_TARGET_2 0x0400
+
+/*
+ * For linux-user, indicates that the page is mapped with the same semantics
+ * in both guest and host.
+ */
+#define PAGE_PASSTHROUGH 0x0800
+
#endif /* CPU_COMMON_H */
--
2.34.1
- [PATCH 00/33] tcg patch queue, pre-pull, Richard Henderson, 2024/01/27
- [PATCH 01/33] cpu-exec: simplify jump cache management, Richard Henderson, 2024/01/27
- [PATCH 02/33] include/exec: Move vaddr defines to separate file, Richard Henderson, 2024/01/27
- [PATCH 03/33] hw/core: Include vaddr.h from cpu.h, Richard Henderson, 2024/01/27
- [PATCH 04/33] target: Use vaddr in gen_intermediate_code, Richard Henderson, 2024/01/27
- [PATCH 06/33] include/exec: typedef abi_ptr to vaddr, Richard Henderson, 2024/01/27
- [PATCH 05/33] include/exec: Use vaddr in DisasContextBase for virtual addresses, Richard Henderson, 2024/01/27
- [PATCH 07/33] target: Uninline cpu_mmu_index(), Richard Henderson, 2024/01/27
- [PATCH 09/33] include/exec: Move PAGE_* macros to common header,
Richard Henderson <=
- [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