aboutsummaryrefslogtreecommitdiff
path: root/memory.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-10-02 14:59:23 +0200
committerAvi Kivity <avi@redhat.com>2012-10-15 11:43:06 +0200
commit9ad2bbc16788d3048d514f3450d0975e59d46119 (patch)
treeab18922d80e5599febca2b96cdc783da77a05d32 /memory.h
parent8786db7cb96f8ce5c75c6e1e074319c9dca8d356 (diff)
downloadqemu-9ad2bbc16788d3048d514f3450d0975e59d46119.zip
qemu-9ad2bbc16788d3048d514f3450d0975e59d46119.tar.gz
qemu-9ad2bbc16788d3048d514f3450d0975e59d46119.tar.bz2
memory: export AddressSpace
The DMA API will use an AddressSpace to differentiate among different initiators. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'memory.h')
-rw-r--r--memory.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/memory.h b/memory.h
index 37ce151..a1d75e7 100644
--- a/memory.h
+++ b/memory.h
@@ -157,6 +157,19 @@ struct MemoryRegionPortio {
#define PORTIO_END_OF_LIST() { }
+typedef struct AddressSpace AddressSpace;
+
+/**
+ * AddressSpace: describes a mapping of addresses to #MemoryRegion objects
+ */
+struct AddressSpace {
+ /* All fields are private. */
+ MemoryRegion *root;
+ struct FlatView *current_map;
+ int ioeventfd_nb;
+ struct MemoryRegionIoeventfd *ioeventfds;
+};
+
typedef struct MemoryRegionSection MemoryRegionSection;
/**
@@ -776,6 +789,14 @@ void memory_global_dirty_log_stop(void);
void mtree_info(fprintf_function mon_printf, void *f);
+/**
+ * address_space_init: initializes an address space
+ *
+ * @as: an uninitialized #AddressSpace
+ * @root: a #MemoryRegion that routes addesses for the address space
+ */
+void address_space_init(AddressSpace *as, MemoryRegion *root);
+
#endif
#endif