mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
d7f4891c85
commit
ac23dd2f29
2 changed files with 5 additions and 19 deletions
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue