From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrCTd-00042X-PR for qemu-devel@nongnu.org; Tue, 17 Jul 2012 14:26:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrCTc-0004z4-Rv for qemu-devel@nongnu.org; Tue, 17 Jul 2012 14:26:29 -0400 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:63039 helo=SMTP.EU.CITRIX.COM) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrCTc-0004yq-Mj for qemu-devel@nongnu.org; Tue, 17 Jul 2012 14:26:28 -0400 Date: Tue, 17 Jul 2012 19:25:21 +0100 From: Stefano Stabellini In-Reply-To: <1342531805-29894-5-git-send-email-anthony.perard@citrix.com> Message-ID: References: <1342531805-29894-1-git-send-email-anthony.perard@citrix.com> <1342531805-29894-5-git-send-email-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Subject: Re: [Qemu-devel] [PATCH 4/4] xen: Always set the vram dirty during migration. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony PERARD Cc: Anthony Liguori , Stefano Stabellini , QEMU-devel , Luiz Capitulino , Avi Kivity , Xen Devel On Tue, 17 Jul 2012, Anthony PERARD wrote: > Because the call to track the dirty bit in the video ram during migration won't > work (it returns -1), we set dirtybit on the all video ram. > > Signed-off-by: Anthony PERARD > --- > xen-all.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/xen-all.c b/xen-all.c > index 498883b..00bdb50 100644 > --- a/xen-all.c > +++ b/xen-all.c > @@ -502,6 +502,11 @@ static void xen_sync_dirty_bitmap(XenIOState *state, > return; > } > > + if (unlikely(xen_in_migration)) { > + /* track_dirty_vram does not work during migration */ > + memory_region_set_dirty(framebuffer, 0, size); > + return; > + } > rc = xc_hvm_track_dirty_vram(xen_xc, xen_domid, > start_addr >> TARGET_PAGE_BITS, npages, > bitmap); Why are you setting the entire framebuffer dirty? We should set dirty only the actualy region that is supposed to be dirty.