aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-07-07 21:40:51 +0100
committerRichard Henderson <richard.henderson@linaro.org>2023-07-15 08:02:32 +0100
commit91e9e116fea2a3b957e86daf55c832155fdf4b04 (patch)
tree84f63a4db5fb1b6273153d9cfc028a321d4ba067 /accel
parentd7b0c5d01374468c36bbe95140b8db8df95a99e3 (diff)
accel/tcg: Accept more page flags in page_check_range
Only PAGE_WRITE needs special attention, all others can be handled as we do for PAGE_READ. Adjust the mask. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230707204054.8792-24-richard.henderson@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r--accel/tcg/user-exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index e4f9563730..1e8fcaf6b0 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -561,8 +561,8 @@ int page_check_range(target_ulong start, target_ulong len, int flags)
}
missing = flags & ~p->flags;
- if (missing & PAGE_READ) {
- ret = -1; /* page not readable */
+ if (missing & ~PAGE_WRITE) {
+ ret = -1; /* page doesn't match */
break;
}
if (missing & PAGE_WRITE) {