From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeMBA-00055E-1F for qemu-devel@nongnu.org; Wed, 15 Oct 2014 06:51:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeMB3-0005RJ-Ko for qemu-devel@nongnu.org; Wed, 15 Oct 2014 06:51:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeMB3-0005RD-Bk for qemu-devel@nongnu.org; Wed, 15 Oct 2014 06:51:33 -0400 From: Gerd Hoffmann Date: Wed, 15 Oct 2014 12:51:26 +0200 Message-Id: <1413370286-20518-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1413370286-20518-1-git-send-email-kraxel@redhat.com> References: <1413370286-20518-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 1/1] qxl: keep going if reaching guest bug on empty area List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann From: Marc-Andr=C3=A9 Lureau Xorg server hangs when using xfig and typing a text with space: #0 qxl_wait_for_io_command (qxl=3D) at qxl_io.c:47 #1 0x00007f826a49a299 in qxl_download_box (surface=3D0x221d030, x1=3D23= 1, y1=3D259, x2=3D, y2=3D) at qxl_surfa= ce.c:143 while (!(ram_header->int_pending & QXL_INTERRUPT_IO_CMD)) usleep (1); The QXL driver is calling QXL_IO_UPDATE_AREA with an empty area. This is a guest bug. The call is async and no ack is sent back on guest bug, so the X server will hang. The driver should be improved to avoid this situation and also to abort on QXL_INTERRUPT_ERROR. This will be a different patch series for the driver. However, it is simple enough to keep qemu running on empty areas update, which is what this patch provides. https://bugzilla.redhat.com/show_bug.cgi?id=3D1151363 Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 93b3518..b540dd6 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1591,6 +1591,11 @@ async_common: qxl_set_guest_bug(d, "QXL_IO_UPDATE_AREA: invalid area (%ux%u)x(%ux%u)\n"= , update.left, update.top, update.right, update.bottom= ); + if (update.left =3D=3D update.right || update.top =3D=3D upd= ate.bottom) { + /* old drivers may provide empty area, keep going */ + qxl_clear_guest_bug(d); + goto cancel_async; + } break; } if (async =3D=3D QXL_ASYNC) { --=20 1.8.3.1