[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v1 06/11] memory: address_space_init: do nothing
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [RFC PATCH v1 06/11] memory: address_space_init: do nothing if no root region given |
Date: |
Mon, 2 Jun 2014 19:09:52 -0700 |
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 <address@hidden>
---
memory.c | 4 ++++
1 file changed, 4 insertions(+)
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);
--
2.0.0
- [Qemu-devel] [RFC PATCH v1 00/11] Per Master Addressing (PMA), Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 01/11] microblaze: ml605: Get rid of useless ddr_base variable, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 02/11] dma: axidma: Variablise repeated s->streams[i] sub-expr, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 03/11] exec: Parent root MRs to the machine, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 04/11] exec: dummy_section: Pass address space through., Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 05/11] memory: Parent Memory Regions to their registered owners, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 06/11] memory: address_space_init: do nothing if no root region given,
Peter Crosthwaite <=
- [Qemu-devel] [RFC PATCH v1 07/11] memory.c: Add address_space_init_shareable(), Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 08/11] qom/cpu: Add Memory Region Property, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 09/11] exec: use per-cpu address-spaces for cpuisms, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 10/11] microblaze: ml605: Convert to PMA, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 11/11] dma: axidma: Convert to PMA, Peter Crosthwaite, 2014/06/02
- Re: [Qemu-devel] [RFC PATCH v1 00/11] Per Master Addressing (PMA), Paolo Bonzini, 2014/06/03
- Re: [Qemu-devel] [RFC PATCH v1 00/11] Per Master Addressing (PMA), Peter Maydell, 2014/06/03