[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 09/14] exec/cpu: Restrict user-specific page definitions
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
[RFC PATCH 09/14] exec/cpu: Restrict user-specific page definitions |
|
Date: |
Sat, 27 Apr 2024 17:57:09 +0200 |
User-specific PAGE definitions shouldn't be used on system emulation.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/exec/page-prot-common.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/exec/page-prot-common.h b/include/exec/page-prot-common.h
index 2722ded724..b1fce45c15 100644
--- a/include/exec/page-prot-common.h
+++ b/include/exec/page-prot-common.h
@@ -17,16 +17,22 @@
/*
* Original state of the write flag (used when tracking self-modifying code)
*/
+#if defined(CONFIG_USER_ONLY)
#define PAGE_WRITE_ORG 0x0010
+#endif
/*
* 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. */
+#if defined(CONFIG_USER_ONLY)
#define PAGE_RESET 0x0040
+#endif
/* For linux-user, indicates that the page is MAP_ANON. */
+#if defined(CONFIG_USER_ONLY)
#define PAGE_ANON 0x0080
+#endif
/* Target-specific bits that will be used via page_get_flags(). */
#define PAGE_TARGET_1 0x0200
@@ -36,6 +42,8 @@
* For linux-user, indicates that the page is mapped with the same semantics
* in both guest and host.
*/
+#if defined(CONFIG_USER_ONLY)
#define PAGE_PASSTHROUGH 0x0800
+#endif
#endif
--
2.41.0
- [PATCH 03/14] plugins/api: Only include 'exec/ram_addr.h' with system emulation, (continued)
- [PATCH 03/14] plugins/api: Only include 'exec/ram_addr.h' with system emulation, Philippe Mathieu-Daudé, 2024/04/27
- [PATCH 05/14] exec/cpu: Indent TARGET_PAGE_foo definitions, Philippe Mathieu-Daudé, 2024/04/27
- [PATCH 06/14] exec/cpu: Remove obsolete PAGE_RESERVED definition, Philippe Mathieu-Daudé, 2024/04/27
- [PATCH 07/14] exec/cpu: Remove duplicated PAGE_PASSTHROUGH definition, Philippe Mathieu-Daudé, 2024/04/27
- [PATCH 08/14] exec/cpu: Extract page-protection definitions to page-prot-common.h, Philippe Mathieu-Daudé, 2024/04/27
- [RFC PATCH 09/14] exec/cpu: Restrict user-specific page definitions,
Philippe Mathieu-Daudé <=
- [PATCH 11/14] accel/tcg: Use cpu_loop_exit_requested() in cpu_loop_exec_tb(), Philippe Mathieu-Daudé, 2024/04/27
- [PATCH 10/14] exec/user: Restrict 'syscall-trace.h' to user emulation, Philippe Mathieu-Daudé, 2024/04/27
- [PATCH 12/14] accel/tcg: Remove pointless initialization of cflags_next_tb, Philippe Mathieu-Daudé, 2024/04/27
- [PATCH 13/14] accel/tcg: Reset TCG specific fields in tcg_cpu_reset_hold(), Philippe Mathieu-Daudé, 2024/04/27