fixes: vnc, cirrus, tcg display updates.
Hi,
Misc bugfixes for the next -rc.
please pull,
Gerd
The following changes since commit 272d7dee5951f926fad1911f2f072e5915cdcba0:
Merge remote-tracking branch 'remotes/kraxel/tags/pull-cirrus-20170316-1' into staging (2017-03-16 16:40:44 +0000)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-fixes-20170320-1
for you to fetch changes up to 7bc4f0846f5e15dad5a54490290241243b5a4416:
vnc: fix a qio-channel leak (2017-03-20 09:07:34 +0100)
----------------------------------------------------------------
fixes for 2.9: vnc, cirrus, tcg display updates.
----------------------------------------------------------------
Alex Bennée (1):
ui/console: ensure graphic updates don't race with TCG vCPUs
Gerd Hoffmann (1):
cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16
Marc-André Lureau (1):
vnc: fix a qio-channel leak
hw/display/cirrus_vga_rop.h | 2 +- ui/console.c | 21 ++++++++++++++++++++- ui/vnc.c | 1 + 3 files changed, 22 insertions(+), 2 deletions(-)
[Qemu-devel] [PULL for-2.9 1/3] ui/console: ensure graphic updates don't race with TCG vCPUs
From: Alex Bennée <[email protected]>
Commit 8d04fb55..
tcg: drop global lock during TCG code execution
..broke the assumption that updates to the GUI couldn't happen at the same time as TCG vCPUs where running. As a result the TCG vCPU could still be updating a directly mapped frame-buffer while the display side was updating. This would cause artefacts to appear when the update code assumed that memory block hadn't changed.
The simplest solution is to ensure the two things can't happen at the same time like the old BQL locking scheme. Here we use the solution introduced for MTTCG and schedule the update as async_safe_work when we know no vCPUs can be running.
Message-id: [email protected]
[ kraxel: updated comment clarifying the display adapters are buggy
and this is a temporary workaround ]
--- ui/console.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
ui/console.c +20 -1
@@ -1575,13 +1575,32 @@ bool dpy_gfx_check_format(QemuConsole *con,return true; } +/* +* Safe DPY refresh for TCG guests. This runs when the TCG vCPUs are +* quiescent so we can avoid races between dirty page tracking for +* direct frame-buffer access by the guest. +* +* This is a temporary stopgap until we've fixed the dirty tracking +* races in display adapters. +*/ +static void do_safe_dpy_refresh (CPUState *cpu,run_on_cpu_data opaque) +{ +DisplayChangeListener *dcl = opaque.host_ptr; + dcl->ops->dpy_refresh (dcl); +} +static void dpy_refresh (DisplayState *s) {DisplayChangeListener *dcl; QLIST_FOREACH(dcl, &s->listeners, next) {if (dcl->ops->dpy_refresh) { - dcl->ops->dpy_refresh (dcl); +if (tcg_enabled ()) { +async_safe_run_on_cpu (first_cpu, do_safe_dpy_refresh, +RUN_ON_CPU_HOST_PTR (dcl)); + }else { + dcl->ops->dpy_refresh (dcl); + } } } }
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL for-2.9 2/3] cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16
In reply to Gerd HoffmannThe switch from pointers to addresses (commit026aeffcb4752054830ba203020ed6eb05bcaba8 andffaf857778286ca54e3804432a2369a279e73aa7) added
a off-by-one bug to 16bit backward blits. Fix.
Message-id: [email protected]
--- hw/display/cirrus_vga_rop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/display/cirrus_vga_rop.h +1 -1
@@ -219,7 +219,7 @@ glue(glue(cirrus_bitblt_rop_bkwd_transp_, ROP_NAME),_16)(CirrusVGAState *s, srcpitch += bltwidth;for (y =0 ; y < bltheight; y++) {for (x =0 ; x < bltwidth; x+=2 ) { -ROP_OP_TR_16 (s, dstaddr,cirrus_src16 (s, srcaddr), transp); +ROP_OP_TR_16 (s, dstaddr -1 ,cirrus_src16 (s, srcaddr -1 ), transp); dstaddr -=2 ; srcaddr -=2 ; }
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL for-2.9 3/3] vnc: fix a qio-channel leak
In reply to Gerd HoffmannFrom: Marc-André Lureau <[email protected]>
Spotted by ASAN.
Message-id: [email protected]
--- ui/vnc.c | 1 + 1 file changed, 1 insertion(+)
ui/vnc.c +1 -0
@@ -3677,6 +3677,7 @@ static int vnc_display_listen_addr(VncDisplay *vd,qio_channel_set_name (QIO_CHANNEL (sioc), name);if (qio_channel_socket_listen_sync ( sioc, rawaddrs[i], listenerr ==NULL ? &listenerr :NULL ) <0 ) { +object_unref (OBJECT (sioc));continue ; } listening = true;
Signature · 1 line
1.8.3.1
Peter Maydell
AppliedQuoted 27 lines · Gerd Hoffmann
Hi,
Misc bugfixes for the next -rc.
please pull,
GerdThe following changes since commit
272d7dee5951f926fad1911f2f072e5915cdcba0:Merge remote-tracking branch 'remotes/kraxel/tags/pull-cirrus-20170316-1' into staging (2017-03-16 16:40:44 +0000)
are available in the git repository at:
git://git.kraxel.org/qemutags/pull-fixes-20170320-1for you to fetch changes up to
7bc4f0846f5e15dad5a54490290241243b5a4416:vnc: fix a qio-channel leak (2017-03-20 09:07:34 +0100)
----------------------------------------------------------------
fixes for 2.9: vnc, cirrus, tcg display updates.----------------------------------------------------------------
Alex Bennée (1):
ui/console: ensure graphic updates don't race with TCG vCPUs
Quoted 5 lines
Gerd Hoffmann (1):
cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16Marc-André Lureau (1):
vnc: fix a qio-channel leak
Applied, thanks.
-- PMM