9ae3a8
From 1c6276766eb0cb15ebefbf14f81accd3fe7716bc Mon Sep 17 00:00:00 2001
9ae3a8
From: Juan Quintela <quintela@redhat.com>
9ae3a8
Date: Tue, 14 Jan 2014 15:07:43 +0100
9ae3a8
Subject: [PATCH 32/40] memory: move private types to exec.c
9ae3a8
9ae3a8
RH-Author: Juan Quintela <quintela@redhat.com>
9ae3a8
Message-id: <1389712071-23303-33-git-send-email-quintela@redhat.com>
9ae3a8
Patchwork-id: 56687
9ae3a8
O-Subject: [RHEL7 qemu-kvm PATCH 32/40] memory: move private types to exec.c
9ae3a8
Bugzilla: 997559
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
9ae3a8
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
9ae3a8
9ae3a8
From: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
9ae3a8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
(cherry picked from commit 1db8abb10243abe969a2ba307664ba51b60fcac6)
9ae3a8
Signed-off-by: Juan Quintela <quintela@trasno.org>
9ae3a8
---
9ae3a8
 exec.c                         | 16 ++++++++++++++++
9ae3a8
 include/exec/memory-internal.h | 15 ---------------
9ae3a8
 2 files changed, 16 insertions(+), 15 deletions(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 exec.c                         |   16 ++++++++++++++++
9ae3a8
 include/exec/memory-internal.h |   15 ---------------
9ae3a8
 2 files changed, 16 insertions(+), 15 deletions(-)
9ae3a8
9ae3a8
diff --git a/exec.c b/exec.c
9ae3a8
index 2bf71bf..12adb12 100644
9ae3a8
--- a/exec.c
9ae3a8
+++ b/exec.c
9ae3a8
@@ -82,6 +82,22 @@ int use_icount;
9ae3a8
 
9ae3a8
 #if !defined(CONFIG_USER_ONLY)
9ae3a8
 
9ae3a8
+typedef struct PhysPageEntry PhysPageEntry;
9ae3a8
+
9ae3a8
+struct PhysPageEntry {
9ae3a8
+    uint16_t is_leaf : 1;
9ae3a8
+     /* index into phys_sections (is_leaf) or phys_map_nodes (!is_leaf) */
9ae3a8
+    uint16_t ptr : 15;
9ae3a8
+};
9ae3a8
+
9ae3a8
+struct AddressSpaceDispatch {
9ae3a8
+    /* This is a multi-level map on the physical address space.
9ae3a8
+     * The bottom level has pointers to MemoryRegionSections.
9ae3a8
+     */
9ae3a8
+    PhysPageEntry phys_map;
9ae3a8
+    MemoryListener listener;
9ae3a8
+};
9ae3a8
+
9ae3a8
 static MemoryRegionSection *phys_sections;
9ae3a8
 static unsigned phys_sections_nb, phys_sections_nb_alloc;
9ae3a8
 static uint16_t phys_section_unassigned;
9ae3a8
diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h
9ae3a8
index d2b85de..327d54e 100644
9ae3a8
--- a/include/exec/memory-internal.h
9ae3a8
+++ b/include/exec/memory-internal.h
9ae3a8
@@ -22,24 +22,9 @@
9ae3a8
 #ifndef CONFIG_USER_ONLY
9ae3a8
 #include "hw/xen/xen.h"
9ae3a8
 
9ae3a8
-typedef struct PhysPageEntry PhysPageEntry;
9ae3a8
-
9ae3a8
-struct PhysPageEntry {
9ae3a8
-    uint16_t is_leaf : 1;
9ae3a8
-     /* index into phys_sections (is_leaf) or phys_map_nodes (!is_leaf) */
9ae3a8
-    uint16_t ptr : 15;
9ae3a8
-};
9ae3a8
 
9ae3a8
 typedef struct AddressSpaceDispatch AddressSpaceDispatch;
9ae3a8
 
9ae3a8
-struct AddressSpaceDispatch {
9ae3a8
-    /* This is a multi-level map on the physical address space.
9ae3a8
-     * The bottom level has pointers to MemoryRegionSections.
9ae3a8
-     */
9ae3a8
-    PhysPageEntry phys_map;
9ae3a8
-    MemoryListener listener;
9ae3a8
-};
9ae3a8
-
9ae3a8
 void address_space_init_dispatch(AddressSpace *as);
9ae3a8
 void address_space_destroy_dispatch(AddressSpace *as);
9ae3a8
 
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8