From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiADx-00052s-3Y for qemu-devel@nongnu.org; Thu, 30 May 2013 17:17:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiADs-0006Hj-70 for qemu-devel@nongnu.org; Thu, 30 May 2013 17:17:29 -0400 Received: from mail-ea0-x233.google.com ([2a00:1450:4013:c01::233]:44611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiADs-0006Hf-1y for qemu-devel@nongnu.org; Thu, 30 May 2013 17:17:24 -0400 Received: by mail-ea0-f179.google.com with SMTP id z16so838801ead.38 for ; Thu, 30 May 2013 14:17:23 -0700 (PDT) Received: from playground.lan (net-37-116-217-184.cust.dsl.vodafone.it. [37.116.217.184]) by mx.google.com with ESMTPSA id s8sm62773732eeo.4.2013.05.30.14.17.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 14:17:22 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 30 May 2013 23:16:50 +0200 Message-Id: <1369948629-2833-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1369948629-2833-1-git-send-email-pbonzini@redhat.com> References: <1369948629-2833-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 02/21] memory: move private types to exec.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini --- exec.c | 16 ++++++++++++++++ include/exec/memory-internal.h | 15 --------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/exec.c b/exec.c index 2cd4eb3..bae4d30 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 799c02a..26689fe 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); -- 1.8.1.4