aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exec.c16
-rw-r--r--include/exec/memory-internal.h15
2 files changed, 16 insertions, 15 deletions
diff --git a/exec.c b/exec.c
index 86efed76bc..510d01bee8 100644
--- a/exec.c
+++ b/exec.c
@@ -81,6 +81,22 @@ int use_icount;
#if !defined(CONFIG_USER_ONLY)
+typedef struct PhysPageEntry PhysPageEntry;
+
+struct PhysPageEntry {
+ uint16_t is_leaf : 1;
+ /* index into phys_sections (is_leaf) or phys_map_nodes (!is_leaf) */
+ uint16_t ptr : 15;
+};
+
+struct AddressSpaceDispatch {
+ /* This is a multi-level map on the physical address space.
+ * The bottom level has pointers to MemoryRegionSections.
+ */
+ PhysPageEntry phys_map;
+ MemoryListener listener;
+};
+
static MemoryRegionSection *phys_sections;
static unsigned phys_sections_nb, phys_sections_nb_alloc;
static uint16_t phys_section_unassigned;
diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h
index 799c02a63c..26689fe252 100644
--- a/include/exec/memory-internal.h
+++ b/include/exec/memory-internal.h
@@ -22,24 +22,9 @@
#ifndef CONFIG_USER_ONLY
#include "hw/xen/xen.h"
-typedef struct PhysPageEntry PhysPageEntry;
-
-struct PhysPageEntry {
- uint16_t is_leaf : 1;
- /* index into phys_sections (is_leaf) or phys_map_nodes (!is_leaf) */
- uint16_t ptr : 15;
-};
typedef struct AddressSpaceDispatch AddressSpaceDispatch;
-struct AddressSpaceDispatch {
- /* This is a multi-level map on the physical address space.
- * The bottom level has pointers to MemoryRegionSections.
- */
- PhysPageEntry phys_map;
- MemoryListener listener;
-};
-
void address_space_init_dispatch(AddressSpace *as);
void address_space_destroy_dispatch(AddressSpace *as);