i386/pc: factor out device_memory base/size to helper
commit8288a8286d00e074b765f1d47ee61159ed5291fd
authorJoao Martins <joao.m.martins@oracle.com>
Tue, 19 Jul 2022 17:00:11 +0000 (19 18:00 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 26 Jul 2022 14:40:58 +0000 (26 10:40 -0400)
tree77c56cc68388820452b3b628383bfa580f68c24d
parent1065b21993628a00066a2ab1439bfff5d186c12d
i386/pc: factor out device_memory base/size to helper

Move obtaining hole64_start from device_memory memory region base/size
into an helper alongside correspondent getters in pc_memory_init() when
the hotplug range is unitialized. While doing that remove the memory
region based logic from this newly added helper.

This is the final step that allows pc_pci_hole64_start() to be callable
at the beginning of pc_memory_init() before any memory regions are
initialized.

Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220719170014.27028-9-joao.m.martins@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/pc.c