Просмотр исходного кода

exec/cpu: Extract page-protection definitions to page-protection.h

Extract page-protection definitions from "exec/cpu-all.h"
to "exec/page-protection.h".

The list of files requiring the new header was generated
using:

$ git grep -wE \
  'PAGE_(READ|WRITE|EXEC|RWX|VALID|ANON|RESERVED|TARGET_.|PASSTHROUGH)'

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240427155714.53669-3-philmd@linaro.org>
Philippe Mathieu-Daudé 1 год назад
Родитель
Сommit
74781c0888
59 измененных файлов с 100 добавлено и 30 удалено
  1. 1 0
      MAINTAINERS
  2. 1 0
      accel/tcg/cputlb.c
  3. 1 0
      accel/tcg/tb-maint.c
  4. 1 0
      accel/tcg/user-exec.c
  5. 1 0
      bsd-user/bsd-mem.h
  6. 1 0
      bsd-user/mmap.c
  7. 1 0
      bsd-user/qemu.h
  8. 1 0
      bsd-user/signal.c
  9. 1 0
      cpu-target.c
  10. 1 0
      hw/ppc/ppc440_bamboo.c
  11. 1 0
      hw/ppc/sam460ex.c
  12. 1 0
      hw/ppc/virtex_ml507.c
  13. 1 0
      include/exec/cpu-all.h
  14. 1 30
      include/exec/cpu-common.h
  15. 41 0
      include/exec/page-protection.h
  16. 1 0
      include/semihosting/uaccess.h
  17. 1 0
      linux-user/arm/cpu_loop.c
  18. 1 0
      linux-user/elfload.c
  19. 1 0
      linux-user/mmap.c
  20. 1 0
      linux-user/signal.c
  21. 1 0
      linux-user/syscall.c
  22. 1 0
      system/physmem.c
  23. 1 0
      target/alpha/helper.c
  24. 1 0
      target/arm/cpu.h
  25. 1 0
      target/arm/ptw.c
  26. 1 0
      target/arm/tcg/m_helper.c
  27. 1 0
      target/arm/tcg/mte_helper.c
  28. 1 0
      target/arm/tcg/sve_helper.c
  29. 1 0
      target/avr/helper.c
  30. 1 0
      target/cris/mmu.c
  31. 1 0
      target/hppa/mem_helper.c
  32. 1 0
      target/hppa/translate.c
  33. 1 0
      target/i386/tcg/sysemu/excp_helper.c
  34. 1 0
      target/loongarch/tcg/tlb_helper.c
  35. 1 0
      target/m68k/helper.c
  36. 1 0
      target/microblaze/helper.c
  37. 1 0
      target/microblaze/mmu.c
  38. 1 0
      target/mips/sysemu/physaddr.c
  39. 1 0
      target/mips/tcg/sysemu/tlb_helper.c
  40. 1 0
      target/openrisc/mmu.c
  41. 1 0
      target/ppc/internal.h
  42. 1 0
      target/ppc/mmu-hash32.c
  43. 1 0
      target/ppc/mmu-hash64.c
  44. 1 0
      target/ppc/mmu-radix64.c
  45. 2 0
      target/ppc/mmu-radix64.h
  46. 1 0
      target/ppc/mmu_common.c
  47. 1 0
      target/ppc/mmu_helper.c
  48. 1 0
      target/riscv/cpu_helper.c
  49. 1 0
      target/riscv/pmp.c
  50. 1 0
      target/riscv/vector_helper.c
  51. 1 0
      target/rx/cpu.c
  52. 1 0
      target/s390x/mmu_helper.c
  53. 1 0
      target/s390x/tcg/mem_helper.c
  54. 1 0
      target/sh4/helper.c
  55. 1 0
      target/sparc/ldst_helper.c
  56. 1 0
      target/sparc/mmu_helper.c
  57. 1 0
      target/tricore/helper.c
  58. 1 0
      target/xtensa/mmu_helper.c
  59. 1 0
      target/xtensa/op_helper.c

+ 1 - 0
MAINTAINERS

@@ -167,6 +167,7 @@ F: include/exec/target_long.h
 F: include/exec/helper*.h
 F: include/exec/helper*.h
 F: include/exec/helper*.h.inc
 F: include/exec/helper*.h.inc
 F: include/exec/helper-info.c.inc
 F: include/exec/helper-info.c.inc
+F: include/exec/page-protection.h
 F: include/sysemu/cpus.h
 F: include/sysemu/cpus.h
 F: include/sysemu/tcg.h
 F: include/sysemu/tcg.h
 F: include/hw/core/tcg-cpu-ops.h
 F: include/hw/core/tcg-cpu-ops.h

+ 1 - 0
accel/tcg/cputlb.c

@@ -21,6 +21,7 @@
 #include "qemu/main-loop.h"
 #include "qemu/main-loop.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/memory.h"
 #include "exec/memory.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cputlb.h"
 #include "exec/cputlb.h"

+ 1 - 0
accel/tcg/tb-maint.c

@@ -23,6 +23,7 @@
 #include "exec/cputlb.h"
 #include "exec/cputlb.h"
 #include "exec/log.h"
 #include "exec/log.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/tb-flush.h"
 #include "exec/tb-flush.h"
 #include "exec/translate-all.h"
 #include "exec/translate-all.h"
 #include "sysemu/tcg.h"
 #include "sysemu/tcg.h"

+ 1 - 0
accel/tcg/user-exec.c

@@ -25,6 +25,7 @@
 #include "qemu/rcu.h"
 #include "qemu/rcu.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cpu_ldst.h"
 #include "exec/translate-all.h"
 #include "exec/translate-all.h"
+#include "exec/page-protection.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"
 #include "qemu/atomic128.h"
 #include "qemu/atomic128.h"
 #include "trace/trace-root.h"
 #include "trace/trace-root.h"

+ 1 - 0
bsd-user/bsd-mem.h

@@ -56,6 +56,7 @@
 #include <fcntl.h>
 #include <fcntl.h>
 
 
 #include "qemu-bsd.h"
 #include "qemu-bsd.h"
+#include "exec/page-protection.h"
 
 
 extern struct bsd_shm_regions bsd_shm_regions[];
 extern struct bsd_shm_regions bsd_shm_regions[];
 extern abi_ulong target_brk;
 extern abi_ulong target_brk;

+ 1 - 0
bsd-user/mmap.c

@@ -17,6 +17,7 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
  */
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
+#include "exec/page-protection.h"
 
 
 #include "qemu.h"
 #include "qemu.h"
 
 

+ 1 - 0
bsd-user/qemu.h

@@ -34,6 +34,7 @@ extern char **environ;
 #include "target_os_signal.h"
 #include "target_os_signal.h"
 #include "target.h"
 #include "target.h"
 #include "exec/gdbstub.h"
 #include "exec/gdbstub.h"
+#include "exec/page-protection.h"
 #include "qemu/clang-tsa.h"
 #include "qemu/clang-tsa.h"
 
 
 #include "qemu-os.h"
 #include "qemu-os.h"

+ 1 - 0
bsd-user/signal.c

@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "qemu/log.h"
 #include "qemu/log.h"
 #include "qemu.h"
 #include "qemu.h"
+#include "exec/page-protection.h"
 #include "user/tswap-target.h"
 #include "user/tswap-target.h"
 #include "gdbstub/user.h"
 #include "gdbstub/user.h"
 #include "signal-common.h"
 #include "signal-common.h"

+ 1 - 0
cpu-target.c

@@ -21,6 +21,7 @@
 #include "qapi/error.h"
 #include "qapi/error.h"
 
 
 #include "exec/target_page.h"
 #include "exec/target_page.h"
+#include "exec/page-protection.h"
 #include "hw/qdev-core.h"
 #include "hw/qdev-core.h"
 #include "hw/qdev-properties.h"
 #include "hw/qdev-properties.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"

+ 1 - 0
hw/ppc/ppc440_bamboo.c

@@ -15,6 +15,7 @@
 #include "qemu/units.h"
 #include "qemu/units.h"
 #include "qemu/datadir.h"
 #include "qemu/datadir.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
+#include "exec/page-protection.h"
 #include "net/net.h"
 #include "net/net.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci.h"
 #include "hw/boards.h"
 #include "hw/boards.h"

+ 1 - 0
hw/ppc/sam460ex.c

@@ -21,6 +21,7 @@
 #include "kvm_ppc.h"
 #include "kvm_ppc.h"
 #include "sysemu/device_tree.h"
 #include "sysemu/device_tree.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/block-backend.h"
+#include "exec/page-protection.h"
 #include "hw/loader.h"
 #include "hw/loader.h"
 #include "elf.h"
 #include "elf.h"
 #include "exec/memory.h"
 #include "exec/memory.h"

+ 1 - 0
hw/ppc/virtex_ml507.c

@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "qemu/datadir.h"
 #include "qemu/datadir.h"
 #include "qemu/units.h"
 #include "qemu/units.h"
+#include "exec/page-protection.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
 #include "hw/sysbus.h"
 #include "hw/char/serial.h"
 #include "hw/char/serial.h"

+ 1 - 0
include/exec/cpu-all.h

@@ -19,6 +19,7 @@
 #ifndef CPU_ALL_H
 #ifndef CPU_ALL_H
 #define CPU_ALL_H
 #define CPU_ALL_H
 
 
+#include "exec/page-protection.h"
 #include "exec/cpu-common.h"
 #include "exec/cpu-common.h"
 #include "exec/memory.h"
 #include "exec/memory.h"
 #include "exec/tswap.h"
 #include "exec/tswap.h"

+ 1 - 30
include/exec/cpu-common.h

@@ -14,6 +14,7 @@
 #endif
 #endif
 #include "hw/core/cpu.h"
 #include "hw/core/cpu.h"
 #include "tcg/debug-assert.h"
 #include "tcg/debug-assert.h"
+#include "exec/page-protection.h"
 
 
 #define EXCP_INTERRUPT  0x10000 /* async interruption */
 #define EXCP_INTERRUPT  0x10000 /* async interruption */
 #define EXCP_HLT        0x10001 /* hlt instruction reached */
 #define EXCP_HLT        0x10001 /* hlt instruction reached */
@@ -208,36 +209,6 @@ 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(CPUState *cpu);
 G_NORETURN void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc);
 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_RWX       (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
-
 /* accel/tcg/cpu-exec.c */
 /* accel/tcg/cpu-exec.c */
 int cpu_exec(CPUState *cpu);
 int cpu_exec(CPUState *cpu);
 
 

+ 41 - 0
include/exec/page-protection.h

@@ -0,0 +1,41 @@
+/*
+ * QEMU page protection definitions.
+ *
+ *  Copyright (c) 2003 Fabrice Bellard
+ *
+ * SPDX-License-Identifier: LGPL-2.1+
+ */
+#ifndef EXEC_PAGE_PROT_COMMON_H
+#define EXEC_PAGE_PROT_COMMON_H
+
+/* same as PROT_xxx */
+#define PAGE_READ      0x0001
+#define PAGE_WRITE     0x0002
+#define PAGE_EXEC      0x0004
+#define PAGE_RWX       (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

+ 1 - 0
include/semihosting/uaccess.h

@@ -17,6 +17,7 @@
 #include "exec/cpu-common.h"
 #include "exec/cpu-common.h"
 #include "exec/cpu-defs.h"
 #include "exec/cpu-defs.h"
 #include "exec/tswap.h"
 #include "exec/tswap.h"
+#include "exec/page-protection.h"
 
 
 #define get_user_u64(val, addr)                                         \
 #define get_user_u64(val, addr)                                         \
     ({ uint64_t val_ = 0;                                               \
     ({ uint64_t val_ = 0;                                               \

+ 1 - 0
linux-user/arm/cpu_loop.c

@@ -24,6 +24,7 @@
 #include "cpu_loop-common.h"
 #include "cpu_loop-common.h"
 #include "signal-common.h"
 #include "signal-common.h"
 #include "semihosting/common-semi.h"
 #include "semihosting/common-semi.h"
+#include "exec/page-protection.h"
 #include "target/arm/syndrome.h"
 #include "target/arm/syndrome.h"
 
 
 #define get_user_code_u32(x, gaddr, env)                \
 #define get_user_code_u32(x, gaddr, env)                \

+ 1 - 0
linux-user/elfload.c

@@ -8,6 +8,7 @@
 
 
 #include "qemu.h"
 #include "qemu.h"
 #include "user/tswap-target.h"
 #include "user/tswap-target.h"
+#include "exec/page-protection.h"
 #include "user/guest-base.h"
 #include "user/guest-base.h"
 #include "user-internals.h"
 #include "user-internals.h"
 #include "signal-common.h"
 #include "signal-common.h"

+ 1 - 0
linux-user/mmap.c

@@ -20,6 +20,7 @@
 #include <sys/shm.h>
 #include <sys/shm.h>
 #include "trace.h"
 #include "trace.h"
 #include "exec/log.h"
 #include "exec/log.h"
+#include "exec/page-protection.h"
 #include "qemu.h"
 #include "qemu.h"
 #include "user-internals.h"
 #include "user-internals.h"
 #include "user-mmap.h"
 #include "user-mmap.h"

+ 1 - 0
linux-user/signal.c

@@ -19,6 +19,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "qemu/bitops.h"
 #include "qemu/bitops.h"
 #include "gdbstub/user.h"
 #include "gdbstub/user.h"
+#include "exec/page-protection.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "hw/core/tcg-cpu-ops.h"
 
 
 #include <sys/ucontext.h>
 #include <sys/ucontext.h>

+ 1 - 0
linux-user/syscall.c

@@ -25,6 +25,7 @@
 #include "qemu/plugin.h"
 #include "qemu/plugin.h"
 #include "tcg/startup.h"
 #include "tcg/startup.h"
 #include "target_mman.h"
 #include "target_mman.h"
+#include "exec/page-protection.h"
 #include <elf.h>
 #include <elf.h>
 #include <endian.h>
 #include <endian.h>
 #include <grp.h>
 #include <grp.h>

+ 1 - 0
system/physmem.c

@@ -31,6 +31,7 @@
 #endif /* CONFIG_TCG */
 #endif /* CONFIG_TCG */
 
 
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/target_page.h"
 #include "exec/target_page.h"
 #include "hw/qdev-core.h"
 #include "hw/qdev-core.h"
 #include "hw/qdev-properties.h"
 #include "hw/qdev-properties.h"

+ 1 - 0
target/alpha/helper.c

@@ -21,6 +21,7 @@
 #include "qemu/log.h"
 #include "qemu/log.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "fpu/softfloat-types.h"
 #include "fpu/softfloat-types.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"
 #include "qemu/qemu-print.h"
 #include "qemu/qemu-print.h"

+ 1 - 0
target/arm/cpu.h

@@ -26,6 +26,7 @@
 #include "cpu-qom.h"
 #include "cpu-qom.h"
 #include "exec/cpu-defs.h"
 #include "exec/cpu-defs.h"
 #include "exec/gdbstub.h"
 #include "exec/gdbstub.h"
+#include "exec/page-protection.h"
 #include "qapi/qapi-types-common.h"
 #include "qapi/qapi-types-common.h"
 #include "target/arm/multiprocessing.h"
 #include "target/arm/multiprocessing.h"
 #include "target/arm/gtimer.h"
 #include "target/arm/gtimer.h"

+ 1 - 0
target/arm/ptw.c

@@ -11,6 +11,7 @@
 #include "qemu/range.h"
 #include "qemu/range.h"
 #include "qemu/main-loop.h"
 #include "qemu/main-loop.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "internals.h"
 #include "internals.h"
 #include "cpu-features.h"
 #include "cpu-features.h"

+ 1 - 0
target/arm/tcg/m_helper.c

@@ -16,6 +16,7 @@
 #include "qemu/bitops.h"
 #include "qemu/bitops.h"
 #include "qemu/log.h"
 #include "qemu/log.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #ifdef CONFIG_TCG
 #ifdef CONFIG_TCG
 #include "exec/cpu_ldst.h"
 #include "exec/cpu_ldst.h"
 #include "semihosting/common-semi.h"
 #include "semihosting/common-semi.h"

+ 1 - 0
target/arm/tcg/mte_helper.c

@@ -22,6 +22,7 @@
 #include "cpu.h"
 #include "cpu.h"
 #include "internals.h"
 #include "internals.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/ram_addr.h"
 #include "exec/ram_addr.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cpu_ldst.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"

+ 1 - 0
target/arm/tcg/sve_helper.c

@@ -21,6 +21,7 @@
 #include "cpu.h"
 #include "cpu.h"
 #include "internals.h"
 #include "internals.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"
 #include "tcg/tcg-gvec-desc.h"
 #include "tcg/tcg-gvec-desc.h"
 #include "fpu/softfloat.h"
 #include "fpu/softfloat.h"

+ 1 - 0
target/avr/helper.c

@@ -24,6 +24,7 @@
 #include "cpu.h"
 #include "cpu.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cpu_ldst.h"
 #include "exec/address-spaces.h"
 #include "exec/address-spaces.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"

+ 1 - 0
target/cris/mmu.c

@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "mmu.h"
 #include "mmu.h"
 
 
 #ifdef DEBUG
 #ifdef DEBUG

+ 1 - 0
target/hppa/mem_helper.c

@@ -21,6 +21,7 @@
 #include "qemu/log.h"
 #include "qemu/log.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"
 #include "hw/core/cpu.h"
 #include "hw/core/cpu.h"
 #include "trace.h"
 #include "trace.h"

+ 1 - 0
target/hppa/translate.c

@@ -22,6 +22,7 @@
 #include "disas/disas.h"
 #include "disas/disas.h"
 #include "qemu/host-utils.h"
 #include "qemu/host-utils.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "tcg/tcg-op.h"
 #include "tcg/tcg-op.h"
 #include "tcg/tcg-op-gvec.h"
 #include "tcg/tcg-op-gvec.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"

+ 1 - 0
target/i386/tcg/sysemu/excp_helper.c

@@ -21,6 +21,7 @@
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cpu_ldst.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "tcg/helper-tcg.h"
 #include "tcg/helper-tcg.h"
 
 
 typedef struct TranslateParams {
 typedef struct TranslateParams {

+ 1 - 0
target/loongarch/tcg/tlb_helper.c

@@ -13,6 +13,7 @@
 #include "internals.h"
 #include "internals.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cpu_ldst.h"
 #include "exec/log.h"
 #include "exec/log.h"
 #include "cpu-csr.h"
 #include "cpu-csr.h"

+ 1 - 0
target/m68k/helper.c

@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/gdbstub.h"
 #include "exec/gdbstub.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"
 #include "gdbstub/helpers.h"
 #include "gdbstub/helpers.h"

+ 1 - 0
target/microblaze/helper.c

@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "qemu/host-utils.h"
 #include "qemu/host-utils.h"
 #include "exec/log.h"
 #include "exec/log.h"
 
 

+ 1 - 0
target/microblaze/mmu.c

@@ -22,6 +22,7 @@
 #include "qemu/log.h"
 #include "qemu/log.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 
 
 static unsigned int tlb_decode_size(unsigned int f)
 static unsigned int tlb_decode_size(unsigned int f)
 {
 {

+ 1 - 0
target/mips/sysemu/physaddr.c

@@ -19,6 +19,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "../internal.h"
 #include "../internal.h"
 
 
 static int is_seg_am_mapped(unsigned int am, bool eu, int mmu_idx)
 static int is_seg_am_mapped(unsigned int am, bool eu, int mmu_idx)

+ 1 - 0
target/mips/tcg/sysemu/tlb_helper.c

@@ -22,6 +22,7 @@
 #include "cpu.h"
 #include "cpu.h"
 #include "internal.h"
 #include "internal.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cpu_ldst.h"
 #include "exec/log.h"
 #include "exec/log.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"

+ 1 - 0
target/openrisc/mmu.c

@@ -22,6 +22,7 @@
 #include "qemu/log.h"
 #include "qemu/log.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "gdbstub/helpers.h"
 #include "gdbstub/helpers.h"
 #include "qemu/host-utils.h"
 #include "qemu/host-utils.h"
 #include "hw/loader.h"
 #include "hw/loader.h"

+ 1 - 0
target/ppc/internal.h

@@ -20,6 +20,7 @@
 
 
 #include "exec/breakpoint.h"
 #include "exec/breakpoint.h"
 #include "hw/registerfields.h"
 #include "hw/registerfields.h"
+#include "exec/page-protection.h"
 
 
 /* PM instructions */
 /* PM instructions */
 typedef enum {
 typedef enum {

+ 1 - 0
target/ppc/mmu-hash32.c

@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "sysemu/kvm.h"
 #include "sysemu/kvm.h"
 #include "kvm_ppc.h"
 #include "kvm_ppc.h"
 #include "internal.h"
 #include "internal.h"

+ 1 - 0
target/ppc/mmu-hash64.c

@@ -21,6 +21,7 @@
 #include "qemu/units.h"
 #include "qemu/units.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "qemu/qemu-print.h"
 #include "qemu/qemu-print.h"
 #include "sysemu/hw_accel.h"
 #include "sysemu/hw_accel.h"

+ 1 - 0
target/ppc/mmu-radix64.c

@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "sysemu/kvm.h"
 #include "sysemu/kvm.h"
 #include "kvm_ppc.h"
 #include "kvm_ppc.h"

+ 2 - 0
target/ppc/mmu-radix64.h

@@ -3,6 +3,8 @@
 
 
 #ifndef CONFIG_USER_ONLY
 #ifndef CONFIG_USER_ONLY
 
 
+#include "exec/page-protection.h"
+
 /* Radix Quadrants */
 /* Radix Quadrants */
 #define R_EADDR_MASK            0x3FFFFFFFFFFFFFFF
 #define R_EADDR_MASK            0x3FFFFFFFFFFFFFFF
 #define R_EADDR_VALID_MASK      0xC00FFFFFFFFFFFFF
 #define R_EADDR_VALID_MASK      0xC00FFFFFFFFFFFFF

+ 1 - 0
target/ppc/mmu_common.c

@@ -25,6 +25,7 @@
 #include "mmu-hash64.h"
 #include "mmu-hash64.h"
 #include "mmu-hash32.h"
 #include "mmu-hash32.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/log.h"
 #include "exec/log.h"
 #include "helper_regs.h"
 #include "helper_regs.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"

+ 1 - 0
target/ppc/mmu_helper.c

@@ -25,6 +25,7 @@
 #include "mmu-hash64.h"
 #include "mmu-hash64.h"
 #include "mmu-hash32.h"
 #include "mmu-hash32.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/log.h"
 #include "exec/log.h"
 #include "helper_regs.h"
 #include "helper_regs.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"

+ 1 - 0
target/riscv/cpu_helper.c

@@ -24,6 +24,7 @@
 #include "internals.h"
 #include "internals.h"
 #include "pmu.h"
 #include "pmu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "instmap.h"
 #include "instmap.h"
 #include "tcg/tcg-op.h"
 #include "tcg/tcg-op.h"
 #include "trace.h"
 #include "trace.h"

+ 1 - 0
target/riscv/pmp.c

@@ -25,6 +25,7 @@
 #include "cpu.h"
 #include "cpu.h"
 #include "trace.h"
 #include "trace.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 
 
 static bool pmp_write_cfg(CPURISCVState *env, uint32_t addr_index,
 static bool pmp_write_cfg(CPURISCVState *env, uint32_t addr_index,
                           uint8_t val);
                           uint8_t val);

+ 1 - 0
target/riscv/vector_helper.c

@@ -23,6 +23,7 @@
 #include "exec/memop.h"
 #include "exec/memop.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cpu_ldst.h"
+#include "exec/page-protection.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"
 #include "fpu/softfloat.h"
 #include "fpu/softfloat.h"
 #include "tcg/tcg-gvec-desc.h"
 #include "tcg/tcg-gvec-desc.h"

+ 1 - 0
target/rx/cpu.c

@@ -22,6 +22,7 @@
 #include "cpu.h"
 #include "cpu.h"
 #include "migration/vmstate.h"
 #include "migration/vmstate.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "hw/loader.h"
 #include "hw/loader.h"
 #include "fpu/softfloat.h"
 #include "fpu/softfloat.h"
 #include "tcg/debug-assert.h"
 #include "tcg/debug-assert.h"

+ 1 - 0
target/s390x/mmu_helper.c

@@ -24,6 +24,7 @@
 #include "sysemu/kvm.h"
 #include "sysemu/kvm.h"
 #include "sysemu/tcg.h"
 #include "sysemu/tcg.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "trace.h"
 #include "trace.h"
 #include "hw/hw.h"
 #include "hw/hw.h"
 #include "hw/s390x/storage-keys.h"
 #include "hw/s390x/storage-keys.h"

+ 1 - 0
target/s390x/tcg/mem_helper.c

@@ -25,6 +25,7 @@
 #include "tcg_s390x.h"
 #include "tcg_s390x.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cpu_ldst.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "qemu/int128.h"
 #include "qemu/int128.h"

+ 1 - 0
target/sh4/helper.c

@@ -21,6 +21,7 @@
 
 
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/log.h"
 #include "exec/log.h"
 
 
 #if !defined(CONFIG_USER_ONLY)
 #if !defined(CONFIG_USER_ONLY)

+ 1 - 0
target/sparc/ldst_helper.c

@@ -23,6 +23,7 @@
 #include "tcg/tcg.h"
 #include "tcg/tcg.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cpu_ldst.h"
 #include "asi.h"
 #include "asi.h"
 
 

+ 1 - 0
target/sparc/mmu_helper.c

@@ -21,6 +21,7 @@
 #include "qemu/log.h"
 #include "qemu/log.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "qemu/qemu-print.h"
 #include "qemu/qemu-print.h"
 #include "trace.h"
 #include "trace.h"
 
 

+ 1 - 0
target/tricore/helper.c

@@ -20,6 +20,7 @@
 #include "hw/registerfields.h"
 #include "hw/registerfields.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 #include "fpu/softfloat-helpers.h"
 #include "fpu/softfloat-helpers.h"
 #include "qemu/qemu-print.h"
 #include "qemu/qemu-print.h"
 
 

+ 1 - 0
target/xtensa/mmu_helper.c

@@ -33,6 +33,7 @@
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"
 #include "qemu/host-utils.h"
 #include "qemu/host-utils.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
+#include "exec/page-protection.h"
 
 
 #define XTENSA_MPU_SEGMENT_MASK 0x0000001f
 #define XTENSA_MPU_SEGMENT_MASK 0x0000001f
 #define XTENSA_MPU_ACC_RIGHTS_MASK 0x00000f00
 #define XTENSA_MPU_ACC_RIGHTS_MASK 0x00000f00

+ 1 - 0
target/xtensa/op_helper.c

@@ -28,6 +28,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"
+#include "exec/page-protection.h"
 #include "qemu/host-utils.h"
 #include "qemu/host-utils.h"
 #include "exec/exec-all.h"
 #include "exec/exec-all.h"
 #include "qemu/atomic.h"
 #include "qemu/atomic.h"