]> git.proxmox.com Git - mirror_qemu.git/commit - hw/mem/memory-device.c
pc-dimm: factor out address search into MemoryDevice code
authorDavid Hildenbrand <david@redhat.com>
Mon, 23 Apr 2018 16:51:20 +0000 (18:51 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Mon, 7 May 2018 13:00:02 +0000 (10:00 -0300)
commitbb0831bdf45a61c83fa1def44ae391260ce2662d
treed195a8f86381c9ef931000428af1d07766809ca3
parentbd6c3e4a4975ee1e5cadbc1826af9bd0ca0954c2
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>
hw/mem/memory-device.c
hw/mem/pc-dimm.c
include/hw/mem/memory-device.h
include/hw/mem/pc-dimm.h