From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxW7L-0001xb-PF for qemu-devel@nongnu.org; Wed, 27 May 2015 03:51:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxW7H-0003cQ-Ll for qemu-devel@nongnu.org; Wed, 27 May 2015 03:51:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxW7H-0003cH-GD for qemu-devel@nongnu.org; Wed, 27 May 2015 03:51:07 -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 (Postfix) with ESMTPS id 0D3D6BDD88 for ; Wed, 27 May 2015 07:51:07 +0000 (UTC) Date: Wed, 27 May 2015 15:51:01 +0800 From: Fam Zheng Message-ID: <20150527075101.GE1751@dhcp-14-238.nay.redhat.com> References: <1432659305-54578-1-git-send-email-pbonzini@redhat.com> <1432659305-54578-8-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1432659305-54578-8-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 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 On Tue, 05/26 18:54, 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. > > Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng > --- > hw/display/framebuffer.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/hw/display/framebuffer.c b/hw/display/framebuffer.c > index 4546e42..2cabced 100644 > --- a/hw/display/framebuffer.c > +++ b/hw/display/framebuffer.c > @@ -63,6 +63,10 @@ void framebuffer_update_display( > assert(mem_section.offset_within_address_space == base); > > memory_region_sync_dirty_bitmap(mem); > + if (!memory_region_is_logging(mem, DIRTY_MEMORY_VGA)) { > + invalidate = true; > + } > + > src_base = cpu_physical_memory_map(base, &src_len, 0); > /* If we can't map the framebuffer then bail. We could try harder, > but it's not really worth it as dirty flag tracking will probably > -- > 1.8.3.1 > > >