memory: late initialization of ram_addr

For non-RAM memory regions, we cannot tell whether this is an I/O region
or an MMIO region.  Since the qemu backing registration is different for
the two, we have to defer initialization until we know which address
space we are in.

These shenanigans will be removed once the backing registration is unified
with the memory API.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Avi Kivity 2011-07-26 14:26:07 +03:00 committed by Anthony Liguori
parent 14a3c10ac8
commit 16ef61c9e5
2 changed files with 21 additions and 4 deletions

View file

@ -89,6 +89,7 @@ struct MemoryRegion {
uint64_t size;
target_phys_addr_t addr;
target_phys_addr_t offset;
bool backend_registered;
ram_addr_t ram_addr;
bool terminates;
MemoryRegion *alias;