[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V7 08/29] memory: flat section iterator
From: |
Steven Sistare |
Subject: |
Re: [PATCH V7 08/29] memory: flat section iterator |
Date: |
Mon, 7 Mar 2022 09:42:01 -0500 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 |
On 3/4/2022 7:48 AM, Philippe Mathieu-Daudé wrote:
> On 22/12/21 20:05, Steve Sistare wrote:
>> Add an iterator over the sections of a flattened address space.
>>
>> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
>> ---
>> include/exec/memory.h | 31 +++++++++++++++++++++++++++++++
>> softmmu/memory.c | 20 ++++++++++++++++++++
>> 2 files changed, 51 insertions(+)
>>
>> diff --git a/include/exec/memory.h b/include/exec/memory.h
>> index 137f5f3..9660475 100644
>> --- a/include/exec/memory.h
>> +++ b/include/exec/memory.h
>> @@ -2338,6 +2338,37 @@ void
>> memory_region_set_ram_discard_manager(MemoryRegion *mr,
>> RamDiscardManager *rdm);
>> /**
>> + * memory_region_section_cb: callback for
>> address_space_flat_for_each_section()
>> + *
>> + * @s: MemoryRegionSection of the range
>
> Nitpicking, can we name this @mrs?
Sure thing - Steve
>> + * @opaque: data pointer passed to address_space_flat_for_each_section()
>> + * @errp: error message, returned to the address_space_flat_for_each_section
>> + * caller.
>> + *
>> + * Returns: non-zero to stop the iteration, and 0 to continue. The same
>> + * non-zero value is returned to the address_space_flat_for_each_section
>> caller.
>> + */
>> +
>> +typedef int (*memory_region_section_cb)(MemoryRegionSection *s,
>> + void *opaque,
>> + Error **errp);