From nobody Tue Sep 9 23:54:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1738158327693273.5974278982137; Wed, 29 Jan 2025 05:45:27 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 876E5118; Wed, 29 Jan 2025 08:45:27 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 98AE617F9; Wed, 29 Jan 2025 08:42:03 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id D18C81527; Wed, 29 Jan 2025 08:41:58 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id A35911784 for ; Wed, 29 Jan 2025 08:41:48 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-471-AdXnf1vyMzOi-PV9RqMfkA-1; Wed, 29 Jan 2025 08:41:46 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DEF4D1800366 for ; Wed, 29 Jan 2025 13:41:45 +0000 (UTC) Received: from localhost (unknown [10.39.208.35]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 94D0C30001BE; Wed, 29 Jan 2025 13:41:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738158108; 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=6Yfn9oOArmEg3zsF8w+p08x/qS9abop9Bj/JFOF8MfA=; b=IKAlUSlF3egV806zX73l4e27xJdOM8KSZQrnVSjB1z//OH2nfZG7fzE5MUjb8XJWIrftYm L+1AZyxa4J2EbgV3m8P0DR3l0QdGyUdr0OADUSiZ6O2kfghfzxr5V/G9PSintiAeL9RspQ CZF8oRcNzBCsvPBMj5qpCNJ+PKhmHAg= X-MC-Unique: AdXnf1vyMzOi-PV9RqMfkA-1 X-Mimecast-MFC-AGG-ID: AdXnf1vyMzOi-PV9RqMfkA From: marcandre.lureau@redhat.com To: devel@lists.libvirt.org Subject: [PATCH 10/19] qemu: use virDomainDefHasGraphics Date: Wed, 29 Jan 2025 17:40:32 +0400 Message-ID: <20250129134042.1282472-11-marcandre.lureau@redhat.com> In-Reply-To: <20250129134042.1282472-1-marcandre.lureau@redhat.com> References: <20250129134042.1282472-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: dEBywOS3XCOMGZ61GzSAkcN2NLe7pLeocm431qdnzWU_1738158106 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: FXEYAJFZSIOJSOXFN6PRPO7VUXB5EJNK X-Message-ID-Hash: FXEYAJFZSIOJSOXFN6PRPO7VUXB5EJNK X-MailFrom: marcandre.lureau@redhat.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1738158328902019000 Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_validate.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 54226b8c62..c5b66c4966 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4409,8 +4409,6 @@ qemuValidateDomainDeviceDefGraphics(const virDomainGr= aphicsDef *graphics, virQEMUCaps *qemuCaps) { virDomainCapsDeviceGraphics graphicsCaps =3D { 0 }; - bool have_egl_headless =3D false; - size_t i; =20 virQEMUCapsFillDomainDeviceGraphicsCaps(qemuCaps, &graphicsCaps); =20 @@ -4421,18 +4419,11 @@ qemuValidateDomainDeviceDefGraphics(const virDomain= GraphicsDef *graphics, return -1; } =20 - for (i =3D 0; i < def->ngraphics; i++) { - if (def->graphics[i]->type =3D=3D VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEA= DLESS) { - have_egl_headless =3D true; - break; - } - } - /* Only VNC and SPICE can be paired with egl-headless, the other types * either don't make sense to pair with egl-headless or aren't even * supported by QEMU. */ - if (have_egl_headless) { + if (virDomainDefHasGraphics(def, VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS= )) { if (graphics->type !=3D VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS && graphics->type !=3D VIR_DOMAIN_GRAPHICS_TYPE_VNC && graphics->type !=3D VIR_DOMAIN_GRAPHICS_TYPE_SPICE) { --=20 2.47.0