diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-12-12 17:50:19 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-12-20 17:44:57 +0100 |
commit | 970ae60e9bdcc2e831b8226a6ebeb37efdc9f5a4 (patch) | |
tree | 58e3ccffd5bb618b1181dc6766bb2dbf94218223 | |
parent | b7cc677478f329912fbc5c16ec36193c72aa9044 (diff) | |
download | qemu-970ae60e9bdcc2e831b8226a6ebeb37efdc9f5a4.zip qemu-970ae60e9bdcc2e831b8226a6ebeb37efdc9f5a4.tar.gz qemu-970ae60e9bdcc2e831b8226a6ebeb37efdc9f5a4.tar.bz2 |
accel/tcg: Move user-related declarations out of 'exec/cpu-all.h' (1/4)
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-12-philmd@linaro.org>
-rw-r--r-- | bsd-user/main.c | 1 | ||||
-rw-r--r-- | bsd-user/mmap.c | 1 | ||||
-rw-r--r-- | include/exec/cpu-all.h | 5 | ||||
-rw-r--r-- | include/user/page-protection.h | 8 | ||||
-rw-r--r-- | linux-user/main.c | 1 | ||||
-rw-r--r-- | linux-user/mmap.c | 1 | ||||
-rw-r--r-- | linux-user/syscall.c | 1 |
7 files changed, 13 insertions, 5 deletions
diff --git a/bsd-user/main.c b/bsd-user/main.c index 61ca73c..0a5bc57 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -38,6 +38,7 @@ #include "qemu/plugin.h" #include "exec/exec-all.h" #include "user/guest-base.h" +#include "user/page-protection.h" #include "tcg/startup.h" #include "qemu/timer.h" #include "qemu/envlist.h" diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index 775e905..346f2ce 100644 --- a/bsd-user/mmap.c +++ b/bsd-user/mmap.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" #include "exec/page-protection.h" +#include "user/page-protection.h" #include "qemu.h" diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 1c8e044..3d97323 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -127,11 +127,6 @@ extern const TargetPageBits target_page; #define TARGET_PAGE_ALIGN(addr) ROUND_UP((addr), TARGET_PAGE_SIZE) #if defined(CONFIG_USER_ONLY) -void page_dump(FILE *f); - -typedef int (*walk_memory_regions_fn)(void *, target_ulong, - target_ulong, unsigned long); -int walk_memory_regions(void *, walk_memory_regions_fn); int page_get_flags(target_ulong address); diff --git a/include/user/page-protection.h b/include/user/page-protection.h index 448c7a0..ea11cf9 100644 --- a/include/user/page-protection.h +++ b/include/user/page-protection.h @@ -12,9 +12,17 @@ #error Cannot include this header from system emulation #endif +#include "cpu-param.h" +#include "exec/target_long.h" #include "exec/translation-block.h" void page_protect(tb_page_addr_t page_addr); int page_unprotect(tb_page_addr_t address, uintptr_t pc); +typedef int (*walk_memory_regions_fn)(void *, target_ulong, + target_ulong, unsigned long); + +int walk_memory_regions(void *, walk_memory_regions_fn); + +void page_dump(FILE *f); #endif diff --git a/linux-user/main.c b/linux-user/main.c index b09af8d..0603730 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -39,6 +39,7 @@ #include "qemu/module.h" #include "qemu/plugin.h" #include "user/guest-base.h" +#include "user/page-protection.h" #include "exec/exec-all.h" #include "exec/gdbstub.h" #include "gdbstub/user.h" diff --git a/linux-user/mmap.c b/linux-user/mmap.c index e4bf5d5..4e0444b 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -22,6 +22,7 @@ #include "exec/log.h" #include "exec/page-protection.h" #include "qemu.h" +#include "user/page-protection.h" #include "user-internals.h" #include "user-mmap.h" #include "target_mman.h" diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1ce4c79..c54b199 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -135,6 +135,7 @@ #include "signal-common.h" #include "loader.h" #include "user-mmap.h" +#include "user/page-protection.h" #include "user/safe-syscall.h" #include "qemu/guest-random.h" #include "qemu/selfmap.h" |