From nobody Fri May 3 04:08:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1660806449; cv=none; d=zohomail.com; s=zohoarc; b=mxaMzPNmdMe1T3CEibg+NivrTHE3IMmx3le41q1XEHEv8mc8HBOD+XbHE2gRgk5OsEIvdeA+jg9l2KaRtyEX2kuFBGfa1wdYcCHJEw4O9aSxkRkcVgy0Ai1LGVMFLTiwjtq2lLuGuqooQHX51tmLDzA5b0QP+Fi6wgYAOpaH9Xg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660806449; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xe9XchB5CPZpmY83ZNGM6EgF0I3CDUZ/FQKGsh6frYQ=; b=efAuXVLN1XyFWdUr6Qa3A7lldBZR6CE+DK8CZPnNd+sAW2BCf5wMzhj+Kgon9XgKgcjIDSpFPPNvnh8ah7vSMTFEAk0mxB43B8Sulcs5ERIk7rDi09P/8fAXYLKPNBGy3V9wq7qsFpmh8tYdpmSadE6Nsj11MfH3hFZrZuJh7KU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1660806449814385.70641440001043; Thu, 18 Aug 2022 00:07:29 -0700 (PDT) Received: from localhost ([::1]:54136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOZcl-0005wv-Ou for importer@patchew.org; Thu, 18 Aug 2022 03:07:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOZSQ-0007uk-9D for qemu-devel@nongnu.org; Thu, 18 Aug 2022 02:56:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:40523) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOZSN-0001hJ-PE for qemu-devel@nongnu.org; Thu, 18 Aug 2022 02:56:44 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-498-CYoUFNY_Nl2ts5gkcp8rtQ-1; Thu, 18 Aug 2022 02:56:39 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 742188032F6; Thu, 18 Aug 2022 06:56:38 +0000 (UTC) Received: from localhost (unknown [10.39.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACFF1C15BBA; Thu, 18 Aug 2022 06:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660805802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xe9XchB5CPZpmY83ZNGM6EgF0I3CDUZ/FQKGsh6frYQ=; b=h5VBmiKDDqvz3FJfjtWSGnOeWiKldoYtRO2qxX9wEuC0IkfWzC9PRB0+gowIcOJCrCMP5W J2/0Gg/WS19Jvfn/Tt68AYIHw+jym37PvJQ/hfr6Y8CQqJHF3yK6Cjxrioz+8zfG1qbFkg fvkQojcdPCciQZDEKexRYiel6baMylk= X-MC-Unique: CYoUFNY_Nl2ts5gkcp8rtQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Beniamino Galvani , Cornelia Huck , Stefan Hajnoczi , Thomas Huth , Gerd Hoffmann , Igor Mitsyanko , David Hildenbrand , Peter Maydell , Richard Henderson , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Antony Pavlov , qemu-s390x@nongnu.org, Priyankar Jain Subject: [PULL 1/3] dbus-vmstate: Restrict error checks to registered proxies in dbus_get_proxies Date: Thu, 18 Aug 2022 10:56:29 +0400 Message-Id: <20220818065631.324170-2-marcandre.lureau@redhat.com> In-Reply-To: <20220818065631.324170-1-marcandre.lureau@redhat.com> References: <20220818065631.324170-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1660806452496100001 From: Priyankar Jain The purpose of dbus_get_proxies to construct the proxies corresponding to t= he IDs registered to dbus-vmstate. Currenty, this function returns an error in case there is any failure while instantiating proxy for "all" the names on dbus. Ideally this function should error out only if it is not able to find and validate the proxies registered to the backend otherwise any offending process(for eg: the process purposefully may not export its Id property on the dbus) may connect to the dbus and can lead to migration failures. This commit ensures that dbus_get_proxies returns an error if it is not able to find and validate the proxies of interest(the IDs registered during the dbus-vmstate instantiation). Signed-off-by: Priyankar Jain Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <1637936117-37977-1-git-send-email-priyankar.jain@nutanix.com> --- backends/dbus-vmstate.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/backends/dbus-vmstate.c b/backends/dbus-vmstate.c index 9cfd758c42..57369ec0f2 100644 --- a/backends/dbus-vmstate.c +++ b/backends/dbus-vmstate.c @@ -114,14 +114,19 @@ dbus_get_proxies(DBusVMState *self, GError **err) "org.qemu.VMState1", NULL, err); if (!proxy) { - return NULL; + if (err !=3D NULL && *err !=3D NULL) { + warn_report("%s: Failed to create proxy: %s", + __func__, (*err)->message); + g_clear_error(err); + } + continue; } =20 result =3D g_dbus_proxy_get_cached_property(proxy, "Id"); if (!result) { - g_set_error_literal(err, G_IO_ERROR, G_IO_ERROR_FAILED, - "VMState Id property is missing."); - return NULL; + warn_report("%s: VMState Id property is missing.", __func__); + g_clear_object(&proxy); + continue; } =20 id =3D g_variant_dup_string(result, &size); --=20 2.37.1 From nobody Fri May 3 04:08:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1660805983; cv=none; d=zohomail.com; s=zohoarc; b=cggZaMK1c6zsrytrSq9+mUomDdxlBY4GRDDMokaZ0PrNH9SueSkF6rrBmSrc/G5okEm1oDhu8tc6qeIDmNrhmuaUh3uw3wvAjzvoScxIWuTnR/Zdabx0VDVlP9JQD8XY7IOkHZWxoThjXMSG+4MqPc+myBEP0HJy+E4qc4vQNh0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660805983; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SMnl2vpRG7/pDRtPtSExUMeUc7WcvgZovwPh+0L2Q8Q=; b=IdJ29tYEOH80YSpa79f8Ihy2g6ng7Rm3et1Ia5jYy9W0/idjuFnuI/CqScM39lRxc3HLLsfkINMCHisRSQRIRtx/u+J7PGS38y1uJs+2pD6c5Nrz/9muR4wv4Q+K1rsJBcDLDjBqYXSY5rnuTziUfa0zDxigq4vPHXuTkl9qENs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1660805983835388.4443291868781; Wed, 17 Aug 2022 23:59:43 -0700 (PDT) Received: from localhost ([::1]:51440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOZVG-0002Ct-Q5 for importer@patchew.org; Thu, 18 Aug 2022 02:59:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOZSU-0007yT-5L for qemu-devel@nongnu.org; Thu, 18 Aug 2022 02:56:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOZSS-0001iN-PE for qemu-devel@nongnu.org; Thu, 18 Aug 2022 02:56:49 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-256-9A0SfIcvO2SEjDoM0-f-sw-1; Thu, 18 Aug 2022 02:56:43 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9041F1C068D1; Thu, 18 Aug 2022 06:56:42 +0000 (UTC) Received: from localhost (unknown [10.39.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id C8CD7C15BC0; Thu, 18 Aug 2022 06:56:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660805808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SMnl2vpRG7/pDRtPtSExUMeUc7WcvgZovwPh+0L2Q8Q=; b=IxldaB4Hydp4/+Ege+F/hpcWVsFRTaJfb1uOxgrDgDxs0zB/w3qZAm1Ee46TjmUhBELdGo ugDHDjkhT0qVRzVrdTd8adbhh0BLNKN7vjM4AJhLIRpqCMoZTEBwGSgyf0ZAHFuXaPT0y7 S7dqUavTYxyRPwPpkSAP7o7bEkmV0P4= X-MC-Unique: 9A0SfIcvO2SEjDoM0-f-sw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Beniamino Galvani , Cornelia Huck , Stefan Hajnoczi , Thomas Huth , Gerd Hoffmann , Igor Mitsyanko , David Hildenbrand , Peter Maydell , Richard Henderson , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Antony Pavlov , qemu-s390x@nongnu.org Subject: [PULL 2/3] build-sys: disable vhost-user-gpu if !opengl Date: Thu, 18 Aug 2022 10:56:30 +0400 Message-Id: <20220818065631.324170-3-marcandre.lureau@redhat.com> In-Reply-To: <20220818065631.324170-1-marcandre.lureau@redhat.com> References: <20220818065631.324170-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1660805984987100003 From: Marc-Andr=C3=A9 Lureau vhost-user-gpu uses epoxy/glflush and thus requires opengl. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20220628132315.664026-1-marcandre.lureau@redhat.com> --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 30a380752c..20fddbd707 100644 --- a/meson.build +++ b/meson.build @@ -1097,7 +1097,7 @@ if (have_system or have_tools) and (virgl.found() or = opengl.found()) gbm =3D dependency('gbm', method: 'pkg-config', required: false, kwargs: static_kwargs) endif -have_vhost_user_gpu =3D have_vhost_user_gpu and virgl.found() and gbm.foun= d() +have_vhost_user_gpu =3D have_vhost_user_gpu and virgl.found() and opengl.f= ound() and gbm.found() =20 gnutls =3D not_found gnutls_crypto =3D not_found --=20 2.37.1 From nobody Fri May 3 04:08:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1660806606; cv=none; d=zohomail.com; s=zohoarc; b=MEct9AfjRKHiDFDAeZ6k6FgYEqDg/a1Ngw3M6jjacM9knFMFyDcn/1v5AgixY30uxG47ZQ0jsLsXTobhdWoeZCQwlOSb41jBPR0bHeevwOr00Wbht7iGysuTmHiKczXhc0BN6x/5PY5emIZPrZ3V24s6oSfxXCpIuq2IK9L0oa4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660806606; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pAaTv33dU5A2LoduERLL5IsesXWJoqzG/AZHNOM0uqQ=; b=SNwP/kYf3TMa0k41XPivST/QLjpnKKcdGz1XLvUynvi9EcXXFASvOdGjlTLaNfP26J5UUHOTRo1zpLBoPYglvwpRbNIDdKzfhrpMRl5r0VBZAbgQ/hYxLNNxpj0GWIt1DAPF2TxhyUVJ+YTSlzLSYHHQ5HiKiFLE96jOsoH28F4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1660806606068185.97197790936343; Thu, 18 Aug 2022 00:10:06 -0700 (PDT) Received: from localhost ([::1]:48784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOZfI-0007SX-1A for importer@patchew.org; Thu, 18 Aug 2022 03:10:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOZSY-00085V-Bt for qemu-devel@nongnu.org; Thu, 18 Aug 2022 02:56:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:40913) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOZSV-0001it-OR for qemu-devel@nongnu.org; Thu, 18 Aug 2022 02:56:54 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-586-g76p7Vf4MQuCv0Q6x_ax5A-1; Thu, 18 Aug 2022 02:56:47 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 96C05811E80; Thu, 18 Aug 2022 06:56:46 +0000 (UTC) Received: from localhost (unknown [10.39.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id A27A440CFD05; Thu, 18 Aug 2022 06:56:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660805810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pAaTv33dU5A2LoduERLL5IsesXWJoqzG/AZHNOM0uqQ=; b=TaypA4DputbNeJswjtzNMva7AY2bXEL26SIs9+MednHxkiqjhN+uBeDacwKj65ae4lz7mI 1vUdySKH+Y629x7mcn389c4RNT0OW7yKaoj7RElOnxgEBUJQb/IlBQFDU31Q06p3EQVTSA 29cyC0vnmMVadoHour7WMZCjVNktjwU= X-MC-Unique: g76p7Vf4MQuCv0Q6x_ax5A-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Beniamino Galvani , Cornelia Huck , Stefan Hajnoczi , Thomas Huth , Gerd Hoffmann , Igor Mitsyanko , David Hildenbrand , Peter Maydell , Richard Henderson , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Antony Pavlov , qemu-s390x@nongnu.org Subject: [PULL 3/3] ui/console: fix qemu_console_resize() regression Date: Thu, 18 Aug 2022 10:56:31 +0400 Message-Id: <20220818065631.324170-4-marcandre.lureau@redhat.com> In-Reply-To: <20220818065631.324170-1-marcandre.lureau@redhat.com> References: <20220818065631.324170-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1660806607714100001 From: Marc-Andr=C3=A9 Lureau The display may be corrupted when changing screen colour depth in qemu-system-ppc/MacOS since 7.0. Do not short-cut qemu_console_resize() if the surface is backed by vga vram. When the scanout isn't set, or it is already allocated, or opengl, and the size is fitting, we still avoid the reallocation & replace path. Fixes: commit cb8962c1 ("ui: do not create a surface when resizing a GL sca= nout") Reported-by: Mark Cave-Ayland Signed-off-by: Marc-Andr=C3=A9 Lureau Acked-by: Gerd Hoffmann Tested-by: Mark Cave-Ayland Message-Id: <20220725115815.2461322-1-marcandre.lureau@redhat.com> --- ui/console.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/console.c b/ui/console.c index e139f7115e..765892f84f 100644 --- a/ui/console.c +++ b/ui/console.c @@ -2575,11 +2575,13 @@ static void vc_chr_open(Chardev *chr, =20 void qemu_console_resize(QemuConsole *s, int width, int height) { - DisplaySurface *surface; + DisplaySurface *surface =3D qemu_console_surface(s); =20 assert(s->console_type =3D=3D GRAPHIC_CONSOLE); =20 - if (qemu_console_get_width(s, -1) =3D=3D width && + if ((s->scanout.kind !=3D SCANOUT_SURFACE || + (surface && surface->flags & QEMU_ALLOCATED_FLAG)) && + qemu_console_get_width(s, -1) =3D=3D width && qemu_console_get_height(s, -1) =3D=3D height) { return; } --=20 2.37.1