Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rth7680 committed Jul 15, 2023
1 parent d7b0c5d commit 91e9e11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions accel/tcg/user-exec.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 91e9e11

Please sign in to comment.