From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ra5OR-00029F-5s for qemu-devel@nongnu.org; Mon, 12 Dec 2011 07:54:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ra5OP-0004tp-Qb for qemu-devel@nongnu.org; Mon, 12 Dec 2011 07:54:07 -0500 Received: from smtp.eu.citrix.com ([62.200.22.115]:60638) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ra5OP-0004tc-IJ for qemu-devel@nongnu.org; Mon, 12 Dec 2011 07:54:05 -0500 Date: Mon, 12 Dec 2011 12:55:26 +0000 From: Stefano Stabellini In-Reply-To: <1323467645-24271-5-git-send-email-anthony.perard@citrix.com> Message-ID: References: <1323467645-24271-1-git-send-email-anthony.perard@citrix.com> <1323467645-24271-5-git-send-email-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Subject: Re: [Qemu-devel] [PATCH V2 4/5] xen: Change memory access behavior during migration. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony PERARD Cc: Xen Devel , QEMU-devel , Stefano Stabellini On Fri, 9 Dec 2011, Anthony PERARD wrote: > Do not allocate RAM during pre-migration runstate. > Do not actually "do" set_memory during migration. > > Signed-off-by: Anthony PERARD > --- > xen-all.c | 13 +++++++++++++ > 1 files changed, 13 insertions(+), 0 deletions(-) > > diff --git a/xen-all.c b/xen-all.c > index b2e9853..c1fed87 100644 > --- a/xen-all.c > +++ b/xen-all.c > @@ -189,6 +189,11 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size) > > trace_xen_ram_alloc(ram_addr, size); > > + if (runstate_check(RUN_STATE_PREMIGRATE)) { > + /* RAM already populated in Xen */ > + return; > + } It is probably worth printing out a message about the address and size qemu wanted to allocated > nr_pfn = size >> TARGET_PAGE_BITS; > pfn_list = g_malloc(sizeof (*pfn_list) * nr_pfn); > > @@ -269,6 +274,13 @@ go_physmap: > DPRINTF("mapping vram to %llx - %llx, from %llx\n", > start_addr, start_addr + size, phys_offset); > > + if (runstate_check(RUN_STATE_INMIGRATE)) { > + /* The mapping should already be done and can not be done a second > + * time. So we just add to the physmap list instead. > + */ > + goto done; > + } same here, printing a message would be useful From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: Re: [PATCH V2 4/5] xen: Change memory access behavior during migration. Date: Mon, 12 Dec 2011 12:55:26 +0000 Message-ID: References: <1323467645-24271-1-git-send-email-anthony.perard@citrix.com> <1323467645-24271-5-git-send-email-anthony.perard@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Return-path: In-Reply-To: <1323467645-24271-5-git-send-email-anthony.perard@citrix.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 To: Anthony PERARD Cc: Xen Devel , QEMU-devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, 9 Dec 2011, Anthony PERARD wrote: > Do not allocate RAM during pre-migration runstate. > Do not actually "do" set_memory during migration. > > Signed-off-by: Anthony PERARD > --- > xen-all.c | 13 +++++++++++++ > 1 files changed, 13 insertions(+), 0 deletions(-) > > diff --git a/xen-all.c b/xen-all.c > index b2e9853..c1fed87 100644 > --- a/xen-all.c > +++ b/xen-all.c > @@ -189,6 +189,11 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size) > > trace_xen_ram_alloc(ram_addr, size); > > + if (runstate_check(RUN_STATE_PREMIGRATE)) { > + /* RAM already populated in Xen */ > + return; > + } It is probably worth printing out a message about the address and size qemu wanted to allocated > nr_pfn = size >> TARGET_PAGE_BITS; > pfn_list = g_malloc(sizeof (*pfn_list) * nr_pfn); > > @@ -269,6 +274,13 @@ go_physmap: > DPRINTF("mapping vram to %llx - %llx, from %llx\n", > start_addr, start_addr + size, phys_offset); > > + if (runstate_check(RUN_STATE_INMIGRATE)) { > + /* The mapping should already be done and can not be done a second > + * time. So we just add to the physmap list instead. > + */ > + goto done; > + } same here, printing a message would be useful