From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rnqav-0002Ag-16 for qemu-devel@nongnu.org; Thu, 19 Jan 2012 06:55:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rnqao-0005AE-7O for qemu-devel@nongnu.org; Thu, 19 Jan 2012 06:55:52 -0500 Received: from smtp.citrix.com ([66.165.176.89]:58447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rnqao-00059s-2v for qemu-devel@nongnu.org; Thu, 19 Jan 2012 06:55:46 -0500 From: Stefano Stabellini Date: Thu, 19 Jan 2012 11:56:21 +0000 Message-ID: <1326974181-32511-6-git-send-email-stefano.stabellini@eu.citrix.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v3 6/6] xen: change memory access behavior during migration. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, Stefano Stabellini , jan.kiszka@siemens.com, avi@redhat.com, Anthony PERARD From: Anthony PERARD Do not allocate RAM during INMIGRATE runstate. Do not actually "do" set_memory during migration. Signed-off-by: Anthony PERARD Signed-off-by: Stefano Stabellini --- xen-all.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/xen-all.c b/xen-all.c index c830cb1..bac06fd 100644 --- a/xen-all.c +++ b/xen-all.c @@ -190,6 +190,11 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr) xen_pfn_t *pfn_list; int i; + if (runstate_check(RUN_STATE_INMIGRATE)) { + /* RAM already populated in Xen */ + return; + } + if (mr == &ram_memory) { return; } @@ -255,6 +260,10 @@ static int xen_add_to_physmap(XenIOState *state, target_phys_addr_t phys_offset = memory_region_get_ram_addr(mr); char path[80], value[17]; + if (runstate_check(RUN_STATE_INMIGRATE)) { + return 0; + } + if (get_physmapping(state, start_addr, size)) { return 0; } -- 1.7.2.5