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