From nobody Sun Feb 8 01:33:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1576629394; cv=none; d=zohomail.com; s=zohoarc; b=HvpUn5bSoWM2HXy2CkBSuk4cqm9eaZ9zm351qFZTGhlYDNk2VoDgG2+T/eyGNu+y52QBqYUb1TpcS+4M4QI7Kfk7oTDTWjUHOt3SrwgsjLFou7/I2zp/garpUCCJwd7X0C/us/sz7nOBTrEUCM+Nnj0gW5oGbaTLGQXm39n4WhM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576629394; 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=UED/Pc+w0XOUpesys39/ZoSGk8kpqPX1hV1LVItzlcU=; b=bRtKRrvOpzCZX+WgN5dxTZU2dnWvFmjwvjo+yonvpjkXTf34wWZwgES62ysbBb7m1YHmmoALTC7WzhA+oE17Ak2O1bo4NCZOIbPi4b9mRApjUlwM77uQUP94Te5ramFSlWsjdvMfmTNDcVFT7Uz6Z4+9hn2hfN4DZAfDNmDRvXo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1576629394304654.7544509925619; Tue, 17 Dec 2019 16:36:34 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-150-8cLgMuXYN-6lWbpFTrTgJA-1; Tue, 17 Dec 2019 19:36:31 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E5589107ACC7; Wed, 18 Dec 2019 00:36:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE39A5D9E1; Wed, 18 Dec 2019 00:36:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E943B104908; Wed, 18 Dec 2019 00:36:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xBI0aMPQ013614 for ; Tue, 17 Dec 2019 19:36:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1A14610E4D16; Wed, 18 Dec 2019 00:36:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 151D410E4D15 for ; Wed, 18 Dec 2019 00:36:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 06D8880207B for ; Wed, 18 Dec 2019 00:36:20 +0000 (UTC) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-18-_5A3KPvROaSkCklf8iQHtA-1; Tue, 17 Dec 2019 19:36:15 -0500 Received: by mail-qt1-f171.google.com with SMTP id l12so481731qtq.12; Tue, 17 Dec 2019 16:36:15 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:2f19:a73a:b6c3:c24a:90f3]) by smtp.gmail.com with ESMTPSA id m21sm96138qka.117.2019.12.17.16.36.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2019 16:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576629392; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=UED/Pc+w0XOUpesys39/ZoSGk8kpqPX1hV1LVItzlcU=; b=Oh7HZGCoFRD7w9A3WMGB0DKn/1BhQkvfvEzeP4zq8MHN1G1tiFUk8U8FmD8KEWzy/c6+Qh j3BeEW+9HKWX7Ly3jTgHKou6GQEbxy+9ps475WF7D3uPc3JLNuSeOMKXpRi8EbPSi8IDT8 ggjx68rhcx+SrOEIz9/51F0uwk0IcUo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BwivIQMBcKlV4h6s++02SbLgp7GNmkn6wR2wcONeelM=; b=gLXQZrR+pK3Ek7Cl6s/+BKtCOpMxv8L+yU7P4WIQJVc3BOr8gsy+PZwf9NlUc5AbG4 mwl27TF7ISpKnwCGRaH0rGW1d3yD9w9wGij6EaEiQoi3imbZE+vEIOCqN4ERYQhdtXAk nIZBQz5LeblXN/NK7vpgMb5JJtof91B4lEgxCv7u4WUK/m4RJtpE5Ml5araqNBPJyR4e aLdk+dC1W243i9YkzWk7AU/QtKi1tdrZGeZtG7X+OVm5zM3FDTLGhAtYBa5GqzZ/Us11 IWb1ycarLYkFL+n3dUfy5PsaLyVUtlsbE54Y0HWcSnRUOQVmLJPkX1zS4GY8owvTSL9I 21Tg== X-Gm-Message-State: APjAAAVim5CV3k280VL7c5eV2G8lQLcThUi5Pno4cLx6CD/HRXZMfD5W MfRji7O36Hl4vOErqrnY8h5OhH3A X-Google-Smtp-Source: APXvYqwvZwcOU/jUntmhK5BJF8Hx4HqfWzP0tAxvzUBTKvETmpR7l+tH5NsWDcZChCX/0T9zPxaing== X-Received: by 2002:ac8:1415:: with SMTP id k21mr680539qtj.80.1576629374703; Tue, 17 Dec 2019 16:36:14 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Tue, 17 Dec 2019 21:36:01 -0300 Message-Id: <20191218003603.4047144-3-danielhb413@gmail.com> In-Reply-To: <20191218003603.4047144-1-danielhb413@gmail.com> References: <20191218003603.4047144-1-danielhb413@gmail.com> MIME-Version: 1.0 X-MC-Unique: _5A3KPvROaSkCklf8iQHtA-1 X-MC-Unique: 8cLgMuXYN-6lWbpFTrTgJA-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id xBI0aMPQ013614 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , crobinso@redhat.com Subject: [libvirt] [PATCH v2 2/4] qemu: command: move qemuBuildGraphicsEGLHeadlessCommandLine validation to qemu_domain.c X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Move EGL Headless validation from qemuBuildGraphicsEGLHeadlessCommandLine() to qemuDomainDeviceDefValidateGraphics(). This function is called by qemuDomainDefValidate(), validating the graphics parameters in domain define time. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_command.c | 10 +--------- src/qemu/qemu_domain.c | 8 ++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3267b0d4b5..b3f069d5d4 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7733,7 +7733,6 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfig= Ptr cfg, static int qemuBuildGraphicsEGLHeadlessCommandLine(virQEMUDriverConfigPtr cfg G_GNUC_= UNUSED, virCommandPtr cmd, - virQEMUCapsPtr qemuCaps, virDomainGraphicsDefPtr graphics) { g_auto(virBuffer) opt =3D VIR_BUFFER_INITIALIZER; @@ -7741,13 +7740,6 @@ qemuBuildGraphicsEGLHeadlessCommandLine(virQEMUDrive= rConfigPtr cfg G_GNUC_UNUSED virBufferAddLit(&opt, "egl-headless"); =20 if (graphics->data.egl_headless.rendernode) { - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_EGL_HEADLESS_RENDERNODE)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("This QEMU doesn't support OpenGL rendernode " - "with egl-headless graphics type")); - return -1; - } - virBufferAddLit(&opt, ",rendernode=3D"); virQEMUBuildBufferEscapeComma(&opt, graphics->data.egl_headless.renderno= de); @@ -7792,7 +7784,7 @@ qemuBuildGraphicsCommandLine(virQEMUDriverConfigPtr c= fg, break; case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: if (qemuBuildGraphicsEGLHeadlessCommandLine(cfg, cmd, - qemuCaps, graphics= ) < 0) + graphics) < 0) return -1; =20 break; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 83964db595..fe353e5bc1 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -7941,6 +7941,14 @@ qemuDomainDeviceDefValidateGraphics(const virDomainG= raphicsDef *graphics, break; =20 case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: + if (graphics->data.egl_headless.rendernode && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_EGL_HEADLESS_RENDERNODE)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("This QEMU doesn't support OpenGL rendernode " + "with egl-headless graphics type")); + return -1; + } + break; case VIR_DOMAIN_GRAPHICS_TYPE_RDP: case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list