From nobody Mon Feb 9 07:43:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1542904589437684.5296569956267; Thu, 22 Nov 2018 08:36:29 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 94F6E30041F2; Thu, 22 Nov 2018 16:36:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63C921725E; Thu, 22 Nov 2018 16:36:27 +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 18379181B9E7; Thu, 22 Nov 2018 16:36:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAMGaPoB027793 for ; Thu, 22 Nov 2018 11:36:25 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7E09C5D777; Thu, 22 Nov 2018 16:36:25 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD7025D760; Thu, 22 Nov 2018 16:36:24 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Thu, 22 Nov 2018 17:36:01 +0100 Message-Id: <506a602bd6be1629f8c499952dc091e4d506f867.1542903572.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 03/12] qemu: caps: Start probing for egl-headless display type 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 22 Nov 2018 16:36:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" QEMU 3.1 introduced the 'query-display-options' QMP command which in itself isn't of any use to us since it can only provide information during runtime as the information is based on what appears on the cmdline. However, just by having the command in place allows us to introspect the @DisplayOptions data type in the QAPI schema. This patch implements the proper way of checking for the 'egl-headless' display capability. Unfortunately, we can't get rid of the old code which set the capability based on a specific QEMU (2.10) version just yet as that would break backwards compatibility. Signed-off-by: Erik Skultety --- src/qemu/qemu_capabilities.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index fde27010e4..90b76db034 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1248,6 +1248,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSc= hemaQueries[] =3D { { "screendump/arg-type/device", QEMU_CAPS_SCREENDUMP_DEVICE }, { "block-commit/arg-type/*top", QEMU_CAPS_ACTIVE_COMMIT }, { "query-iothreads/ret-type/poll-max-ns", QEMU_CAPS_IOTHREAD_POLLING }, + { "query-display-options/ret-type/+egl-headless", QEMU_CAPS_EGL_HEADLE= SS }, }; =20 typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps; @@ -4122,11 +4123,6 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT); } =20 - /* '-display egl-headless' cmdline option is supported since QEMU 2.10= , but - * there's no way to probe it */ - if (qemuCaps->version >=3D 2010000) - virQEMUCapsSet(qemuCaps, QEMU_CAPS_EGL_HEADLESS); - /* no way to query for -numa dist */ if (qemuCaps->version >=3D 2010000) virQEMUCapsSet(qemuCaps, QEMU_CAPS_NUMA_DIST); @@ -4212,6 +4208,15 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, virQEMUCapsClear(qemuCaps, QEMU_CAPS_SEV_GUEST); } =20 + /* '-display egl-headless' cmdline option is supported since QEMU 2.10= , but + * until QEMU 3.1 there hasn't been a way to probe it + * + * NOTE: One day in a future far far away, we can ditch this check + */ + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_EGL_HEADLESS) && + qemuCaps->version >=3D 2010000) + virQEMUCapsSet(qemuCaps, QEMU_CAPS_EGL_HEADLESS); + ret =3D 0; cleanup: return ret; --=20 2.19.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list