[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/29] framebuffer: check memory_region_is_logging
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 07/29] framebuffer: check memory_region_is_logging |
Date: |
Mon, 27 Apr 2015 18:28:15 +0200 |
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.
Signed-off-by: Paolo Bonzini <address@hidden>
---
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
- [Qemu-devel] [PATCH v2 00/29] Dirty bitmap atomic access and optimizations, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 02/29] g364fb: remove pointless call to memory_region_set_coalescing, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 04/29] display: add memory_region_sync_dirty_bitmap calls, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 03/29] display: enable DIRTY_MEMORY_VGA tracking explicitly, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 05/29] memory: differentiate memory_region_is_logging and memory_region_get_dirty_log_mask, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 06/29] memory: prepare for multiple bits in the dirty log mask, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 07/29] framebuffer: check memory_region_is_logging,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 08/29] ui/console: remove dpy_gfx_update_dirty, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 10/29] kvm: accept non-mapped memory in kvm_dirty_pages_log_change, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 09/29] memory: track DIRTY_MEMORY_CODE in mr->dirty_log_mask, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 11/29] memory: include DIRTY_MEMORY_MIGRATION in the dirty log mask, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 12/29] kvm: remove special handling of DIRTY_MEMORY_MIGRATION in the dirty log mask, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 13/29] ram_addr: tweaks to xen_modified_memory, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 15/29] exec: move functions to translate-all.h, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 14/29] exec: use memory_region_get_dirty_log_mask to optimize dirty tracking, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 16/29] translate-all: remove unnecessary argument to tb_invalidate_phys_range, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 17/29] cputlb: remove useless arguments to tlb_unprotect_code_phys, rename, Paolo Bonzini, 2015/04/27