From 10310cbd6298def2dafd40069e27df2d25e233c5 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 6 Mar 2023 02:03:13 +0300 Subject: accel/tcg: Pass last not end to page_reset_target_data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index a2662b1..64cb62d 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -277,7 +277,7 @@ int walk_memory_regions(void *, walk_memory_regions_fn); int page_get_flags(target_ulong address); void page_set_flags(target_ulong start, target_ulong last, int flags); -void page_reset_target_data(target_ulong start, target_ulong end); +void page_reset_target_data(target_ulong start, target_ulong last); int page_check_range(target_ulong start, target_ulong len, int flags); /** -- cgit v1.1