diff options
author | David Hildenbrand <david@redhat.com> | 2023-06-23 14:45:53 +0200 |
---|---|---|
committer | David Hildenbrand <david@redhat.com> | 2023-07-12 09:25:37 +0200 |
commit | ac23dd2f293c59a5cd2fb385162277b4a6aef769 (patch) | |
tree | 170db45df4ef0797e91a4dbbec9522774d0f60e0 /include | |
parent | d7f4891c85886efde88e0893ec19f89a9d14138e (diff) | |
download | qemu-ac23dd2f293c59a5cd2fb385162277b4a6aef769.zip qemu-ac23dd2f293c59a5cd2fb385162277b4a6aef769.tar.gz qemu-ac23dd2f293c59a5cd2fb385162277b4a6aef769.tar.bz2 |
memory-device: Track used region size in DeviceMemoryState
Let's avoid iterating over all devices and simply track it in the
DeviceMemoryState.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20230623124553.400585-11-david@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/boards.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h index 3b7c30e..ed83360 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -298,11 +298,13 @@ struct MachineClass { * address space for memory devices starts * @mr: address space container for memory devices * @dimm_size: the sum of plugged DIMMs' sizes + * @used_region_size: the part of @mr already used by memory devices */ typedef struct DeviceMemoryState { hwaddr base; MemoryRegion mr; uint64_t dimm_size; + uint64_t used_region_size; } DeviceMemoryState; /** |