Received: from eggs.gnu.org ([2001:4830:134:3::10]:60314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx9hk-0003Et-2o for qemu-devel@nongnu.org; Tue, 26 May 2015 03:55:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx9hg-0008Fw-SI for qemu-devel@nongnu.org; Tue, 26 May 2015 03:55:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx9hg-0008Fs-Li for qemu-devel@nongnu.org; Tue, 26 May 2015 03:55:12 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4Q7tBS4030248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 26 May 2015 03:55:11 -0400 Date: Tue, 26 May 2015 15:55:06 +0800 From: Fam Zheng Message-ID: <20150526075506.GG13749@ad.nay.redhat.com> References: <1430152117-100558-1-git-send-email-pbonzini@redhat.com> <1430152117-100558-7-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430152117-100558-7-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH 06/29] memory: prepare for multiple bits in the dirty log mask List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com On Mon, 04/27 18:28, Paolo Bonzini wrote: > When the dirty log mask will also cover other bits than DIRTY_MEMORY_VGA, > some listeners may be interested in the overall zero/non-zero value of > the dirty log mask; others may be interested in the value of single bits. > > For this reason, always call log_start/log_stop if bits have respectively > appeared or disappeared, and pass the old and new values of the dirty log > mask so that listeners can distinguish the kinds of change. > > For example, KVM checks if dirty logging used to be completely disabled > (in log_start) or is now completely disabled (in log_stop). On the > other hand, Xen has to check manually if DIRTY_MEMORY_VGA changed, > since that is the only bit it cares about. > > Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng