From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 08/15] memory: introduce PhysMap to present snapshot of toploygy Date: Wed, 08 Aug 2012 12:27:33 +0300 Message-ID: <50223105.8030104@redhat.com> References: <1344407156-25562-1-git-send-email-qemulist@gmail.com> <1344407156-25562-9-git-send-email-qemulist@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, Blue Swirl , Anthony Liguori , Stefan Hajnoczi , Paolo Bonzini , =?ISO-8859-1?Q?Andreas_F=E4rber?= To: Liu Ping Fan Return-path: In-Reply-To: <1344407156-25562-9-git-send-email-qemulist@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On 08/08/2012 09:25 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > PhysMap contain the flatview and radix-tree view, they are snapshot > of system topology and should be consistent. With PhysMap, we can > swap the pointer when updating and achieve the atomic. > > Signed-off-by: Liu Ping Fan > --- > exec.c | 8 -------- > memory.c | 33 --------------------------------- > memory.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- > 3 files changed, 60 insertions(+), 43 deletions(-) > > diff --git a/exec.c b/exec.c > index 0e29ef9..01b91b0 100644 > --- a/exec.c > +++ b/exec.c > @@ -156,8 +156,6 @@ typedef struct PageDesc { > #endif > > /* Size of the L2 (and L3, etc) page tables. */ > -#define L2_BITS 10 > -#define L2_SIZE (1 << L2_BITS) > > #define P_L2_LEVELS \ > (((TARGET_PHYS_ADDR_SPACE_BITS - TARGET_PAGE_BITS - 1) / L2_BITS) + 1) > @@ -185,7 +183,6 @@ uintptr_t qemu_host_page_mask; > static void *l1_map[V_L1_SIZE]; > > #if !defined(CONFIG_USER_ONLY) > -typedef struct PhysPageEntry PhysPageEntry; This (and the other stuff you're moving) is private memory internals. It should be moved to memory-internals.h (currently named exec-obsolete.h). -- error compiling committee.c: too many arguments to function