]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
accel/tcg: Make page_set_flags() documentation public
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 22 Aug 2024 09:50:42 +0000 (11:50 +0200)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 8 Oct 2024 13:40:31 +0000 (06:40 -0700)
Commit e505a063ba ("translate-all: Add assert_(memory|tb)_lock
annotations") states page_set_flags() is "public APIs and [is]
documented as needing them held for linux-user mode".
Document the prototype.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240822095045.72643-2-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/user-exec.c
include/exec/cpu-all.h

index 7ddc47b0ba45390f24216e7e357273bb38a9fe39..11b6d45e90f9a59918cdd1e825b1db36c5de25cb 100644 (file)
@@ -485,11 +485,6 @@ static bool pageflags_set_clear(target_ulong start, target_ulong last,
     return inval_tb;
 }
 
-/*
- * Modify the flags of a page and invalidate the code if necessary.
- * The flag PAGE_WRITE_ORG is positioned automatically depending
- * on PAGE_WRITE.  The mmap_lock should already be held.
- */
 void page_set_flags(target_ulong start, target_ulong last, int flags)
 {
     bool reset = false;
index 6f09b86e7f3ecc61a884da7f7b0d7ce697eb38ea..45e66769380ce9cb585b8e285dfe3142967ec83d 100644 (file)
@@ -166,7 +166,20 @@ typedef int (*walk_memory_regions_fn)(void *, target_ulong,
 int walk_memory_regions(void *, walk_memory_regions_fn);
 
 int page_get_flags(target_ulong address);
+
+/**
+ * page_set_flags:
+ * @start: first byte of range
+ * @last: last byte of range
+ * @flags: flags to set
+ * Context: holding mmap lock
+ *
+ * Modify the flags of a page and invalidate the code if necessary.
+ * The flag PAGE_WRITE_ORG is positioned automatically depending
+ * on PAGE_WRITE.  The mmap_lock should already be held.
+ */
 void page_set_flags(target_ulong start, target_ulong last, int flags);
+
 void page_reset_target_data(target_ulong start, target_ulong last);
 
 /**