Skip to content

Commit

Permalink
memory: move private types to exec.c
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed Jun 20, 2013
1 parent 9f02960 commit 1db8abb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
16 changes: 16 additions & 0 deletions exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
15 changes: 0 additions & 15 deletions include/exec/memory-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1db8abb

Please sign in to comment.