From b3566001d4d4c3f4626442584556bd18b0e7243b Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 18 Mar 2021 17:48:21 +0000 Subject: memory: Add offset_in_region to flatview_cb arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function flatview_for_each_range() calls a callback for each range in a FlatView. Currently the callback gets the start and length of the range and the MemoryRegion involved, but not the offset within the MemoryRegion. Add this to the callback's arguments; we're going to want it for a new use in the next commit. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210318174823.18066-4-peter.maydell@linaro.org --- include/exec/memory.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/exec/memory.h') diff --git a/include/exec/memory.h b/include/exec/memory.h index 88c2451c06..5728a681b2 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -782,6 +782,7 @@ static inline FlatView *address_space_to_flatview(AddressSpace *as) * @start: start address of the range within the FlatView * @len: length of the range in bytes * @mr: MemoryRegion covering this range + * @offset_in_region: offset of the first byte of the range within @mr * @opaque: data pointer passed to flatview_for_each_range() * * Returns: true to stop the iteration, false to keep going. @@ -789,6 +790,7 @@ static inline FlatView *address_space_to_flatview(AddressSpace *as) typedef bool (*flatview_cb)(Int128 start, Int128 len, const MemoryRegion *mr, + hwaddr offset_in_region, void *opaque); /** -- cgit v1.2.3