aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/exec/translate-all.h5
-rw-r--r--include/user/page-protection.h20
2 files changed, 20 insertions, 5 deletions
diff --git a/include/exec/translate-all.h b/include/exec/translate-all.h
index c50661a..039668f 100644
--- a/include/exec/translate-all.h
+++ b/include/exec/translate-all.h
@@ -25,9 +25,4 @@
/* translate-all.c */
void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr);
-#ifdef CONFIG_USER_ONLY
-void page_protect(tb_page_addr_t page_addr);
-int page_unprotect(tb_page_addr_t address, uintptr_t pc);
-#endif
-
#endif /* TRANSLATE_ALL_H */
diff --git a/include/user/page-protection.h b/include/user/page-protection.h
new file mode 100644
index 0000000..448c7a0
--- /dev/null
+++ b/include/user/page-protection.h
@@ -0,0 +1,20 @@
+/*
+ * QEMU page protection declarations.
+ *
+ * Copyright (c) 2003 Fabrice Bellard
+ *
+ * SPDX-License-Identifier: LGPL-2.1+
+ */
+#ifndef USER_PAGE_PROTECTION_H
+#define USER_PAGE_PROTECTION_H
+
+#ifndef CONFIG_USER_ONLY
+#error Cannot include this header from system emulation
+#endif
+
+#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);
+
+#endif