diff options
-rw-r--r-- | exec.c | 2 | ||||
-rw-r--r-- | include/exec/memory.h | 2 | ||||
-rw-r--r-- | memory.c | 1 |
3 files changed, 5 insertions, 0 deletions
@@ -1717,6 +1717,8 @@ ram_addr_t qemu_ram_alloc_internal(ram_addr_t size, ram_addr_t max_size, error_propagate(errp, local_err); return -1; } + + mr->ram_block = new_block; return addr; } diff --git a/include/exec/memory.h b/include/exec/memory.h index c92734ae2b..683be46cd0 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -34,6 +34,7 @@ #include "qapi/error.h" #include "qom/object.h" #include "qemu/rcu.h" +#include "qemu/typedefs.h" #define MAX_PHYS_ADDR_SPACE_BITS 62 #define MAX_PHYS_ADDR (((hwaddr)1 << MAX_PHYS_ADDR_SPACE_BITS) - 1) @@ -172,6 +173,7 @@ struct MemoryRegion { bool global_locking; uint8_t dirty_log_mask; ram_addr_t ram_addr; + RAMBlock *ram_block; Object *owner; const MemoryRegionIOMMUOps *iommu_ops; @@ -912,6 +912,7 @@ void memory_region_init(MemoryRegion *mr, } mr->name = g_strdup(name); mr->owner = owner; + mr->ram_block = NULL; if (name) { char *escaped_name = memory_region_escape_name(name); |