accel/tcg: Move user-related declarations out of 'exec/cpu-all.h' (4/4)
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 12 Dec 2024 17:01:41 +0000 (18:01 +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-15-philmd@linaro.org>

accel/tcg/tb-maint.c
bsd-user/signal.c
cpu-target.c
include/exec/cpu-all.h
include/user/page-protection.h
linux-user/arm/cpu_loop.c
linux-user/signal.c
target/arm/tcg/helper-a64.c
target/s390x/tcg/mem_helper.c

index 8e272cf790fcbf94064cc289be978628f8dc6385..3f1bebf6ab5b0908338b5e3c84a190a176d38679 100644 (file)
@@ -33,6 +33,9 @@
 #include "tb-internal.h"
 #include "internal-common.h"
 #include "internal-target.h"
+#ifdef CONFIG_USER_ONLY
+#include "user/page-protection.h"
+#endif
 
 
 /* List iterators for lists of tagged pointers in TranslationBlock. */
index da49b9bffc1faa086ab4a979d69fdcd9fa2d5d05..edbcd461bfa3d138001dcc0c9ebf50164c0a7132 100644 (file)
@@ -22,6 +22,7 @@
 #include "qemu/log.h"
 #include "qemu.h"
 #include "exec/page-protection.h"
+#include "user/page-protection.h"
 #include "user/tswap-target.h"
 #include "gdbstub/user.h"
 #include "signal-common.h"
index e9fc4a5be0ebeec2114c1910585d47a6b67a0cc0..7a2efa890c4b9ed915cbe008a90ca946a7797048 100644 (file)
@@ -29,6 +29,7 @@
 #include "migration/vmstate.h"
 #ifdef CONFIG_USER_ONLY
 #include "qemu.h"
+#include "user/page-protection.h"
 #else
 #include "hw/core/sysemu-cpu-ops.h"
 #include "exec/address-spaces.h"
index 73b11f58abbcfc393eba6696579fd8602235efd4..f7eea33b1013f8150b85a962dc03002bf413316b 100644 (file)
@@ -126,12 +126,6 @@ extern const TargetPageBits target_page;
 
 #define TARGET_PAGE_ALIGN(addr) ROUND_UP((addr), TARGET_PAGE_SIZE)
 
-#if defined(CONFIG_USER_ONLY)
-
-int page_get_flags(target_ulong address);
-
-#endif
-
 CPUArchState *cpu_copy(CPUArchState *env);
 
 /* Flags for use in ENV->INTERRUPT_PENDING.
index bdd98a37de1f7f99dc6a45e1b4a13e68718d86bf..51daa1864800594a730826084c9768fe1015366a 100644 (file)
@@ -19,6 +19,8 @@
 void page_protect(tb_page_addr_t page_addr);
 int page_unprotect(tb_page_addr_t address, uintptr_t pc);
 
+int page_get_flags(target_ulong address);
+
 /**
  * page_set_flags:
  * @start: first byte of range
index ec665862d93e93682b5137d37f2247f68fc9fe81..709f718a99d8400795115eceb362a677abd975e2 100644 (file)
@@ -25,6 +25,7 @@
 #include "signal-common.h"
 #include "semihosting/common-semi.h"
 #include "exec/page-protection.h"
+#include "user/page-protection.h"
 #include "target/arm/syndrome.h"
 
 #define get_user_code_u32(x, gaddr, env)                \
index 9b6d772882d867845eaa9b481d93c6a0b3e14482..a191e9b26f2b088e5e0388359a776b66c60946d8 100644 (file)
@@ -33,6 +33,7 @@
 #include "trace.h"
 #include "signal-common.h"
 #include "host-signal.h"
+#include "user/page-protection.h"
 #include "user/safe-syscall.h"
 #include "tcg/tcg.h"
 
index 35dce4bef3c347d8c04a1501c87d7bcfb986fec0..b6af2a59d6349b7a72349c11d34ae6fa24c26083 100644 (file)
@@ -34,6 +34,9 @@
 #include "qemu/atomic128.h"
 #include "fpu/softfloat.h"
 #include <zlib.h> /* for crc32 */
+#ifdef CONFIG_USER_ONLY
+#include "user/page-protection.h"
+#endif
 
 /* C2.4.7 Multiply and divide */
 /* special cases for 0 and LLONG_MIN are mandated by the standard */
index 0e12dae2aa8f8ad1310a965ed3740ca5a8bcc216..307388e5bd1cdb949a42b3d504286014d3110929 100644 (file)
@@ -31,7 +31,9 @@
 #include "qemu/int128.h"
 #include "qemu/atomic128.h"
 
-#if !defined(CONFIG_USER_ONLY)
+#if defined(CONFIG_USER_ONLY)
+#include "user/page-protection.h"
+#else
 #include "hw/s390x/storage-keys.h"
 #include "hw/boards.h"
 #endif