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>
This commit is contained in:
Richard Henderson 2023-07-07 21:40:51 +01:00
parent d7b0c5d013
commit 91e9e116fe

View file

@ -561,8 +561,8 @@ int page_check_range(target_ulong start, target_ulong len, int flags)
} }
missing = flags & ~p->flags; missing = flags & ~p->flags;
if (missing & PAGE_READ) { if (missing & ~PAGE_WRITE) {
ret = -1; /* page not readable */ ret = -1; /* page doesn't match */
break; break;
} }
if (missing & PAGE_WRITE) { if (missing & PAGE_WRITE) {