From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxAs2-0006N2-Ge for qemu-devel@nongnu.org; Tue, 26 May 2015 05:10:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxApK-0001mo-CE for qemu-devel@nongnu.org; Tue, 26 May 2015 05:07:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxApK-0001mg-4I for qemu-devel@nongnu.org; Tue, 26 May 2015 05:07:10 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id C3F1FB5E7C for ; Tue, 26 May 2015 09:07:09 +0000 (UTC) Message-ID: <556437B9.1060600@redhat.com> Date: Tue, 26 May 2015 11:07:05 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1430152117-100558-1-git-send-email-pbonzini@redhat.com> <1430152117-100558-12-git-send-email-pbonzini@redhat.com> <20150526084031.GL13749@ad.nay.redhat.com> In-Reply-To: <20150526084031.GL13749@ad.nay.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 11/29] memory: include DIRTY_MEMORY_MIGRATION in the dirty log mask List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com On 26/05/2015 10:40, Fam Zheng wrote: > > @@ -1329,7 +1329,11 @@ bool memory_region_is_skip_dump(MemoryRegion *= mr) > > =20 > > uint8_t memory_region_get_dirty_log_mask(MemoryRegion *mr) > > { > > - return mr->dirty_log_mask; > > + uint8_t mask =3D mr->dirty_log_mask; > > + if (global_dirty_log) { > > + mask |=3D (1 << DIRTY_MEMORY_MIGRATION); >=20 > This is ugly, but I don't know how to do differently. :( Why do you think it's ugly? As long as the log_start/log_stop callbacks are handled properly, I think it's okay. I find the "Refresh DIRTY_LOG_MIGRATION bit." part uglier. :) Paolo