OSDN Git Service

accel/tcg: Pass last not end to page_collection_lock
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 6 Mar 2023 00:42:12 +0000 (03:42 +0300)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 28 Mar 2023 22:23:10 +0000 (15:23 -0700)
commitf6555e3f39ea118754c03e8b5d92fa3aa0dd6093
tree09b1e50799ad300fe9e85a5d33df541ec10de95d
parentf7e2add5fd29ab067ab39c3d31a911ffcf1f7b17
accel/tcg: Pass last not end to page_collection_lock

Pass the address of the last byte to be changed, rather than
the first address past the last byte.  This avoids overflow
when the last page of the address space is involved.

Fixes a bug in the loop comparision where "<= end" would lock
one more page than required.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/tb-maint.c