diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2017-04-21 11:16:27 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-04-24 10:12:28 +0200 |
commit | fec5e8c92becad223df9d972770522f64aafdb72 (patch) | |
tree | 004929ca50deead19525ab056701a4b628cd70cb /hw/display/framebuffer.c | |
parent | f3289f6f0f9781d1fe77b4cfc3f18a6336eaed72 (diff) |
vga: make display updates thread safe.
The vga code clears the dirty bits *after* reading the framebuffer
memory. So if the guest framebuffer updates hits the race window
between vga reading the framebuffer and vga clearing the dirty bits
vga will miss that update
Fix it by using the new memory_region_copy_and_clear_dirty()
memory_region_copy_get_dirty() functions. That way we clear the
dirty bitmap before reading the framebuffer. Any guest display
updates happening in parallel will be properly tracked in the
dirty bitmap then and the next display refresh will pick them up.
Problem triggers with mttcg only. Before mttcg was merged tcg
never ran in parallel to vga emulation. Using kvm will hide the
problem too, due to qemu operating on a userspace copy of the
kernel's dirty bitmap.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170421091632.30900-5-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/framebuffer.c')
0 files changed, 0 insertions, 0 deletions