From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxI9E-00055J-Iy for qemu-devel@nongnu.org; Tue, 26 May 2015 12:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxI9D-0004sS-Nk for qemu-devel@nongnu.org; Tue, 26 May 2015 12:56:12 -0400 Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:37972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxI9D-0004qA-AX for qemu-devel@nongnu.org; Tue, 26 May 2015 12:56:11 -0400 Received: by wichy4 with SMTP id hy4so89299373wic.1 for ; Tue, 26 May 2015 09:55:35 -0700 (PDT) Received: from 640k.localdomain (dynamic-adsl-94-39-199-114.clienti.tiscali.it. [94.39.199.114]) by mx.google.com with ESMTPSA id x3sm17749309wiy.20.2015.05.26.09.55.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2015 09:55:34 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 26 May 2015 18:54:43 +0200 Message-Id: <1432659305-54578-8-git-send-email-pbonzini@redhat.com> In-Reply-To: <1432659305-54578-1-git-send-email-pbonzini@redhat.com> References: <1432659305-54578-1-git-send-email-pbonzini@redhat.com> Subject: [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: 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. 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 -- 1.8.3.1