Message ID | a5d3ce605c5825a86bf22b58f788258c314d5b61.1401760826.git.peter.crosthwaite@xilinx.com |
---|---|
State | New |
Headers | show |
diff --git a/memory.c b/memory.c index 9192941..6f5e0e5 100644 --- a/memory.c +++ b/memory.c @@ -1936,6 +1936,10 @@ void address_space_init(AddressSpace *as, MemoryRegion *root, const char *name) memory_init(); } + if (!root) { + return; + } + memory_region_transaction_begin(); as->root = root; as->current_map = g_new(FlatView, 1);
Just ignore this case. This is need for bus master device realize when the machine model doesn't connect an attachment. Then machine model may decide to not set a memory region for mastering yet the device will attempt to create itself an address space come realize time. Gracefully do nothing. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> --- memory.c | 4 ++++ 1 file changed, 4 insertions(+)