diff options
| author | David Hildenbrand <david@redhat.com> | 2018-04-23 18:51:20 +0200 |
|---|---|---|
| committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-05-07 10:00:02 -0300 |
| commit | bb0831bdf45a61c83fa1def44ae391260ce2662d (patch) | |
| tree | d195a8f86381c9ef931000428af1d07766809ca3 /include/hw/mem/memory-device.h | |
| parent | bd6c3e4a4975ee1e5cadbc1826af9bd0ca0954c2 (diff) | |
| download | focaccia-qemu-bb0831bdf45a61c83fa1def44ae391260ce2662d.tar.gz focaccia-qemu-bb0831bdf45a61c83fa1def44ae391260ce2662d.zip | |
pc-dimm: factor out address search into MemoryDevice code
This mainly moves code, but does a handfull of optimizations: - We pass the machine instead of the address space properties - We check the hinted address directly and handle fragmented memory better - We make the search independent of pc-dimm Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180423165126.15441-6-david@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/hw/mem/memory-device.h')
| -rw-r--r-- | include/hw/mem/memory-device.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h index 31f64cbab2..3427c7d424 100644 --- a/include/hw/mem/memory-device.h +++ b/include/hw/mem/memory-device.h @@ -41,5 +41,8 @@ typedef struct MemoryDeviceClass { MemoryDeviceInfoList *qmp_memory_device_list(void); uint64_t get_plugged_memory_size(void); +uint64_t memory_device_get_free_addr(MachineState *ms, const uint64_t *hint, + uint64_t align, uint64_t size, + Error **errp); #endif |