memory: maintain a list of address spaces

Instead of embedding knowledge of the memory and I/O address spaces in the
memory core, maintain a list of all address spaces.  This list will later
be extended dynamically for other bus masters.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Avi Kivity 2012-10-02 15:28:50 +02:00
parent 9ad2bbc167
commit 0d673e36a7
2 changed files with 48 additions and 29 deletions

View file

@ -164,10 +164,12 @@ typedef struct AddressSpace AddressSpace;
*/
struct AddressSpace {
/* All fields are private. */
const char *name;
MemoryRegion *root;
struct FlatView *current_map;
int ioeventfd_nb;
struct MemoryRegionIoeventfd *ioeventfds;
QTAILQ_ENTRY(AddressSpace) address_spaces_link;
};
typedef struct MemoryRegionSection MemoryRegionSection;