From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sz2YJ-0007rI-LX for qemu-devel@nongnu.org; Wed, 08 Aug 2012 05:27:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sz2YI-0006Zt-6F for qemu-devel@nongnu.org; Wed, 08 Aug 2012 05:27:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sz2YH-0006Za-TP for qemu-devel@nongnu.org; Wed, 08 Aug 2012 05:27:42 -0400 Message-ID: <50223105.8030104@redhat.com> Date: Wed, 08 Aug 2012 12:27:33 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1344407156-25562-1-git-send-email-qemulist@gmail.com> <1344407156-25562-9-git-send-email-qemulist@gmail.com> In-Reply-To: <1344407156-25562-9-git-send-email-qemulist@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/15] memory: introduce PhysMap to present snapshot of toploygy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan 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?= 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