accel/tcg: Move user-related declarations out of 'exec/cpu-all.h' (3/4)
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 12 Dec 2024 17:08:43 +0000 (18:08 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 20 Dec 2024 16:44:57 +0000 (17:44 +0100)
Move declarations related to page protection under user
emulation from "exec/cpu-all.h" to "user/page-protection.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20241212185341.2857-14-philmd@linaro.org>

bsd-user/qemu.h
include/exec/cpu-all.h
include/user/page-protection.h
linux-user/qemu.h
target/arm/tcg/sve_helper.c
target/hppa/op_helper.c
target/sparc/ldst_helper.c

index 3736c417860737af845cb20d6874452e8c1544e2..04faee459df7963a831332fb2528be6702275d48 100644 (file)
@@ -26,6 +26,7 @@
 #include "exec/exec-all.h"
 
 #include "user/abitypes.h"
+#include "user/page-protection.h"
 
 extern char **environ;
 
index 86cd40020c977f89988cb97c44d5196a50244e12..73b11f58abbcfc393eba6696579fd8602235efd4 100644 (file)
@@ -130,18 +130,6 @@ extern const TargetPageBits target_page;
 
 int page_get_flags(target_ulong address);
 
-/**
- * page_check_range
- * @start: first byte of range
- * @len: length of range
- * @flags: flags required for each page
- *
- * Return true if every page in [@start, @start+@len) has @flags set.
- * Return false if any page is unmapped.  Thus testing flags == 0 is
- * equivalent to testing for flags == PAGE_VALID.
- */
-bool page_check_range(target_ulong start, target_ulong last, int flags);
-
 #endif
 
 CPUArchState *cpu_copy(CPUArchState *env);
index d21fab1aaf9ffbab60c2a7b9387aaa56ce318174..bdd98a37de1f7f99dc6a45e1b4a13e68718d86bf 100644 (file)
@@ -34,6 +34,18 @@ void page_set_flags(target_ulong start, target_ulong last, int flags);
 
 void page_reset_target_data(target_ulong start, target_ulong last);
 
+/**
+ * page_check_range
+ * @start: first byte of range
+ * @len: length of range
+ * @flags: flags required for each page
+ *
+ * Return true if every page in [@start, @start+@len) has @flags set.
+ * Return false if any page is unmapped.  Thus testing flags == 0 is
+ * equivalent to testing for flags == PAGE_VALID.
+ */
+bool page_check_range(target_ulong start, target_ulong last, int flags);
+
 /**
  * page_check_range_empty:
  * @start: first byte of range
index 67bc81b1499014739b002509a4e7a18afe977433..5f0075015183769cf7a8b310c1fdd2bbcc4b4a11 100644 (file)
@@ -5,6 +5,7 @@
 #include "exec/cpu_ldst.h"
 
 #include "user/abitypes.h"
+#include "user/page-protection.h"
 
 #include "syscall_defs.h"
 #include "target_syscall.h"
index 85fe3cae3ed0da42b2ce1bdec7a02723848c5945..d0865dece35d246ec89c9383a57d2bd81108777c 100644 (file)
@@ -29,6 +29,9 @@
 #include "vec_internal.h"
 #include "sve_ldst_internal.h"
 #include "hw/core/tcg-cpu-ops.h"
+#ifdef CONFIG_USER_ONLY
+#include "user/page-protection.h"
+#endif
 
 
 /* Return a value for NZCV as per the ARM PredTest pseudofunction.
index 744325969f5c5e9780a631db42e811ca7f9fe166..beb8f88799ef302b0bc5d1675fee70094b363cfe 100644 (file)
@@ -25,6 +25,9 @@
 #include "exec/cpu_ldst.h"
 #include "qemu/timer.h"
 #include "trace.h"
+#ifdef CONFIG_USER_ONLY
+#include "user/page-protection.h"
+#endif
 
 G_NORETURN void HELPER(excp)(CPUHPPAState *env, int excp)
 {
index d92c9f15934e0a3ed8e1afe12e9295730acafec2..4c54e45655352d5261fdd8449904c82de28cb5fa 100644 (file)
@@ -26,6 +26,9 @@
 #include "exec/exec-all.h"
 #include "exec/page-protection.h"
 #include "exec/cpu_ldst.h"
+#ifdef CONFIG_USER_ONLY
+#include "user/page-protection.h"
+#endif
 #include "asi.h"
 
 //#define DEBUG_MMU