summary refs log tree commit diff stats
path: root/accel/tcg/tb-internal.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-03-27 16:48:09 -0500
committerRichard Henderson <richard.henderson@linaro.org>2025-04-23 15:04:57 -0700
commitb103cc6e74ac92f070a0e004bd84334e845c20b5 (patch)
treea67de38225dbbcede28a526e19ebd6312de67cf9 /accel/tcg/tb-internal.h
parentaa6f138abada97176598c89a9e4e3a7c3d47cb1e (diff)
downloadfocaccia-qemu-b103cc6e74ac92f070a0e004bd84334e845c20b5.tar.gz
focaccia-qemu-b103cc6e74ac92f070a0e004bd84334e845c20b5.zip
accel/tcg: Remove page_protect
Merge the user-only page_protect function with the user-only
implementation of tb_lock_page0.  This avoids pulling
page-protection.h into tb-internal.h.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel/tcg/tb-internal.h')
-rw-r--r--accel/tcg/tb-internal.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/accel/tcg/tb-internal.h b/accel/tcg/tb-internal.h
index 68aa8d17f4..f7c2073e29 100644
--- a/accel/tcg/tb-internal.h
+++ b/accel/tcg/tb-internal.h
@@ -51,28 +51,23 @@
 
 #endif /* CONFIG_SOFTMMU */
 
+void tb_lock_page0(tb_page_addr_t);
+
 #ifdef CONFIG_USER_ONLY
-#include "user/page-protection.h"
 /*
  * For user-only, page_protect sets the page read-only.
  * Since most execution is already on read-only pages, and we'd need to
  * account for other TBs on the same page, defer undoing any page protection
  * until we receive the write fault.
  */
-static inline void tb_lock_page0(tb_page_addr_t p0)
-{
-    page_protect(p0);
-}
-
 static inline void tb_lock_page1(tb_page_addr_t p0, tb_page_addr_t p1)
 {
-    page_protect(p1);
+    tb_lock_page0(p1);
 }
 
 static inline void tb_unlock_page1(tb_page_addr_t p0, tb_page_addr_t p1) { }
 static inline void tb_unlock_pages(TranslationBlock *tb) { }
 #else
-void tb_lock_page0(tb_page_addr_t);
 void tb_lock_page1(tb_page_addr_t, tb_page_addr_t);
 void tb_unlock_page1(tb_page_addr_t, tb_page_addr_t);
 void tb_unlock_pages(TranslationBlock *);