From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0tMC-00023A-Qn for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:16:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0tMB-0007y7-HI for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:16:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0tMB-0007xd-Cn for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:16:27 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 1ED46329DBD for ; Fri, 5 Jun 2015 15:16:27 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-29.ams2.redhat.com [10.36.112.29]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t55FG4kO012808 for ; Fri, 5 Jun 2015 11:16:26 -0400 From: Paolo Bonzini Date: Fri, 5 Jun 2015 17:15:13 +0200 Message-Id: <1433517363-32335-13-git-send-email-pbonzini@redhat.com> In-Reply-To: <1433517363-32335-1-git-send-email-pbonzini@redhat.com> References: <1433517363-32335-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 12/62] framebuffer: check memory_region_is_logging List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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. Reviewed-by: Fam Zheng Signed-off-by: Paolo Bonzini --- 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 -- 2.4.1