From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx9oY-0007kj-EY for qemu-devel@nongnu.org; Tue, 26 May 2015 04:02:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx9oR-0002DC-Tc for qemu-devel@nongnu.org; Tue, 26 May 2015 04:02:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx9oR-0002D0-P1 for qemu-devel@nongnu.org; Tue, 26 May 2015 04:02:11 -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 632E13C227 for ; Tue, 26 May 2015 08:02:11 +0000 (UTC) Date: Tue, 26 May 2015 16:02:08 +0800 From: Fam Zheng Message-ID: <20150526080208.GH13749@ad.nay.redhat.com> References: <1430152117-100558-1-git-send-email-pbonzini@redhat.com> <1430152117-100558-8-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-8-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH 07/29] framebuffer: check memory_region_is_logging 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: > framebuffer.c expects DIRTY_MEMORY_VGA logging to be always on, but that > will not be the case soon. Because framebuffer.c computes the memory > region on the fly for every update (with memory_region_find), it cannot > enable/disable logging by itself. > > Instead, always treat updates as invalidations if dirty logging is > not enabled, assuming that the board will enable logging on the > RAM region that includes the framebuffer. > > To simplify the code, replace memory_region_get_dirty with > memory_region_test_and_clear_dirty. Then memory_region_reset_dirty > is only needed in the invalidate case. The commit message seems out-of-date, but I think it's better to keep the v1 hunks which skip memory_region_get_dirty if invalidate == true, otherwise use memory_region_test_and_clear_dirty. Fam