Skip to content

Commit

Permalink
accel/tcg: Fix type of 'last' for pageflags_{find,next}
Browse files Browse the repository at this point in the history
These should match 'start' as target_ulong, not target_long.

On 32bit targets, the parameter was sign-extended to uint64_t,
so only the first mmap within the upper 2GB memory can succeed.

Signed-off-by: Luca Bonissi <qemu@bonslack.org>
Message-Id: <327460e2-0ebd-9edb-426b-1df80d16c32a@bonslack.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
Luca Bonissi authored and rth7680 committed Jul 24, 2023
1 parent 8c605cf commit 32b1203
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions accel/tcg/user-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ typedef struct PageFlagsNode {

static IntervalTreeRoot pageflags_root;

static PageFlagsNode *pageflags_find(target_ulong start, target_long last)
static PageFlagsNode *pageflags_find(target_ulong start, target_ulong last)
{
IntervalTreeNode *n;

Expand All @@ -153,7 +153,7 @@ static PageFlagsNode *pageflags_find(target_ulong start, target_long last)
}

static PageFlagsNode *pageflags_next(PageFlagsNode *p, target_ulong start,
target_long last)
target_ulong last)
{
IntervalTreeNode *n;

Expand Down

0 comments on commit 32b1203

Please sign in to comment.