From nobody Thu Nov 6 02:11:55 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539350793165713.0908092095883; Fri, 12 Oct 2018 06:26:33 -0700 (PDT) Received: from localhost ([::1]:40610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAxSV-0001ww-NG for importer@patchew.org; Fri, 12 Oct 2018 09:26:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAxNw-0006q3-Dk for qemu-devel@nongnu.org; Fri, 12 Oct 2018 09:21:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAxNs-0002Xv-4I for qemu-devel@nongnu.org; Fri, 12 Oct 2018 09:21:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34160) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAxNr-0002X3-Tt for qemu-devel@nongnu.org; Fri, 12 Oct 2018 09:21:40 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3FDC7307D874 for ; Fri, 12 Oct 2018 13:21:39 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-238.ams2.redhat.com [10.36.116.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1DF5860165; Fri, 12 Oct 2018 13:21:36 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 147BF41A62; Fri, 12 Oct 2018 15:21:35 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 12 Oct 2018 15:21:33 +0200 Message-Id: <20181012132135.12313-2-kraxel@redhat.com> In-Reply-To: <20181012132135.12313-1-kraxel@redhat.com> References: <20181012132135.12313-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 12 Oct 2018 13:21:39 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/3] gtk: Don't vte_terminal_set_encoding() on new VTE versions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Kevin Wolf The function vte_terminal_set_encoding() is deprecated since VTE 0.54, so stop calling it from that version on. This fixes a build error because of our use of warning flags [-Werror=3Ddeprecated-declarations]. Fixes: https://bugs.launchpad.net/bugs/1794939 Reported-by: Bastian Koppelmann Signed-off-by: Kevin Wolf Message-id: 20181011153039.2324-1-kwolf@redhat.com Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 3ddb5fe162..1d68276253 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1951,13 +1951,15 @@ static GSList *gd_vc_vte_init(GtkDisplayState *s, V= irtualConsole *vc, g_signal_connect(vc->vte.terminal, "commit", G_CALLBACK(gd_vc_in), vc); =20 /* The documentation says that the default is UTF-8, but actually it is - * 7-bit ASCII at least in VTE 0.38. - */ + * 7-bit ASCII at least in VTE 0.38. The function is deprecated since + * VTE 0.54 (only UTF-8 is supported now). */ +#if !VTE_CHECK_VERSION(0, 54, 0) #if VTE_CHECK_VERSION(0, 38, 0) vte_terminal_set_encoding(VTE_TERMINAL(vc->vte.terminal), "UTF-8", NUL= L); #else vte_terminal_set_encoding(VTE_TERMINAL(vc->vte.terminal), "UTF-8"); #endif +#endif =20 vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->vte.terminal), -1); vte_terminal_set_size(VTE_TERMINAL(vc->vte.terminal), --=20 2.9.3 From nobody Thu Nov 6 02:11:55 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539350630766541.0705405021254; Fri, 12 Oct 2018 06:23:50 -0700 (PDT) Received: from localhost ([::1]:40593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAxPx-000889-FV for importer@patchew.org; Fri, 12 Oct 2018 09:23:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAxNw-0006qW-TF for qemu-devel@nongnu.org; Fri, 12 Oct 2018 09:21:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAxNs-0002Y3-7H for qemu-devel@nongnu.org; Fri, 12 Oct 2018 09:21:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45042) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAxNr-0002X5-Ug for qemu-devel@nongnu.org; Fri, 12 Oct 2018 09:21:40 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4AA5030001E2 for ; Fri, 12 Oct 2018 13:21:39 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-238.ams2.redhat.com [10.36.116.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1BEA360476; Fri, 12 Oct 2018 13:21:36 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1C5734F278; Fri, 12 Oct 2018 15:21:35 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 12 Oct 2018 15:21:34 +0200 Message-Id: <20181012132135.12313-3-kraxel@redhat.com> In-Reply-To: <20181012132135.12313-1-kraxel@redhat.com> References: <20181012132135.12313-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 12 Oct 2018 13:21:39 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/3] sdl2: Support all virtio-gpu formats X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Max Reitz There are some 2D resource formats that can be used through virtio-gpu, but which are not supported by SDL2 when used for a scanout; these are all alpha-channel formats and also XBGR (RGBX in non-BE pixman). Add these formats in the switch converting pixman to SDL format constants so a guest cannot crash the VM by triggering the g_assert_not_reached() with an unsupported format. Signed-off-by: Max Reitz Message-id: 20181008185013.19371-1-mreitz@redhat.com [ kraxel: also update sdl2_2d_check_format() ] Signed-off-by: Gerd Hoffmann --- ui/sdl2-2d.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ui/sdl2-2d.c b/ui/sdl2-2d.c index 85484407be..091ecfcc7f 100644 --- a/ui/sdl2-2d.c +++ b/ui/sdl2-2d.c @@ -101,15 +101,24 @@ void sdl2_2d_switch(DisplayChangeListener *dcl, case PIXMAN_r5g6b5: format =3D SDL_PIXELFORMAT_RGB565; break; + case PIXMAN_a8r8g8b8: case PIXMAN_x8r8g8b8: format =3D SDL_PIXELFORMAT_ARGB8888; break; + case PIXMAN_a8b8g8r8: + case PIXMAN_x8b8g8r8: + format =3D SDL_PIXELFORMAT_ABGR8888; + break; + case PIXMAN_r8g8b8a8: case PIXMAN_r8g8b8x8: format =3D SDL_PIXELFORMAT_RGBA8888; break; case PIXMAN_b8g8r8x8: format =3D SDL_PIXELFORMAT_BGRX8888; break; + case PIXMAN_b8g8r8a8: + format =3D SDL_PIXELFORMAT_BGRA8888; + break; default: g_assert_not_reached(); } @@ -149,7 +158,13 @@ bool sdl2_2d_check_format(DisplayChangeListener *dcl, * the native ones. Thes are the ones I have tested. */ return (format =3D=3D PIXMAN_x8r8g8b8 || + format =3D=3D PIXMAN_a8r8g8b8 || + format =3D=3D PIXMAN_a8b8g8r8 || + format =3D=3D PIXMAN_x8b8g8r8 || format =3D=3D PIXMAN_b8g8r8x8 || + format =3D=3D PIXMAN_b8g8r8a8 || + format =3D=3D PIXMAN_r8g8b8x8 || + format =3D=3D PIXMAN_r8g8b8a8 || format =3D=3D PIXMAN_x1r5g5b5 || format =3D=3D PIXMAN_r5g6b5); } --=20 2.9.3 From nobody Thu Nov 6 02:11:55 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539350668965867.6192451610722; Fri, 12 Oct 2018 06:24:28 -0700 (PDT) Received: from localhost ([::1]:40594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAxQZ-0000F7-Ra for importer@patchew.org; Fri, 12 Oct 2018 09:24:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAxNw-0006qT-Sf for qemu-devel@nongnu.org; Fri, 12 Oct 2018 09:21:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAxNr-0002Xp-UU for qemu-devel@nongnu.org; Fri, 12 Oct 2018 09:21:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47370) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAxNr-0002WU-Kq for qemu-devel@nongnu.org; Fri, 12 Oct 2018 09:21:39 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D7D8130026CD for ; Fri, 12 Oct 2018 13:21:38 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-238.ams2.redhat.com [10.36.116.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 201341057044; Fri, 12 Oct 2018 13:21:36 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 23F3C4FD5C; Fri, 12 Oct 2018 15:21:35 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 12 Oct 2018 15:21:35 +0200 Message-Id: <20181012132135.12313-4-kraxel@redhat.com> In-Reply-To: <20181012132135.12313-1-kraxel@redhat.com> References: <20181012132135.12313-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 12 Oct 2018 13:21:38 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/3] gtk: fix uninitialized variable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Paolo Bonzini zoom_to_fit is never initialized to false, Coverity complains (not sure why GCC does not). Fixes: e8b1386ea1719525a1a92df03377764703fe8c64 Cc: kraxel@redhat.com Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20181003121138.22037-1-pbonzini@redhat.com Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 1d68276253..c4dd17a6fa 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2138,7 +2138,7 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, Vir= tualConsole *vc, QemuConsole *con, int idx, GSList *group, GtkWidget *view_menu) { - bool zoom_to_fit; + bool zoom_to_fit =3D false; =20 vc->label =3D qemu_console_get_label(con); vc->s =3D s; --=20 2.9.3