From nobody Mon Apr 29 22:21:36 2024 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 1531917119053979.3707156580497; Wed, 18 Jul 2018 05:31:59 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 6AD593002C8C; Wed, 18 Jul 2018 12:31:56 +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 B9EFF5D9C6; Wed, 18 Jul 2018 12:31:55 +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 D06A818037EF; Wed, 18 Jul 2018 12:31:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6ICVqw1005319 for ; Wed, 18 Jul 2018 08:31:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id EFF652027047; Wed, 18 Jul 2018 12:31:51 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 52A552026D69; Wed, 18 Jul 2018 12:31:51 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Wed, 18 Jul 2018 14:31:37 +0200 Message-Id: <270086a2ad350b0d96f59c917eea3880b09ba6ab.1531916860.git.eskultet@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Katerina Koukiou Subject: [libvirt] [PATCH v4 01/10] docs: formatdomain: unify naming for CPUs/vCPUs 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: , MIME-Version: 1.0 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 18 Jul 2018 12:31:57 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Katerina Koukiou CPU is an acronym and should be written in uppercase when part of plain text and not refering to an element. Signed-off-by: Katerina Koukiou --- docs/formatdomain.html.in | 84 +++++++++++++++++++++++--------------------= ---- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index b00971a945..d08ede9ab5 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -631,45 +631,45 @@
vcpus
- The vcpus element allows to control state of individual vcpus. + The vcpus element allows to control state of individual vCPUs. =20 The id attribute specifies the vCPU id as used by lib= virt - in other places such as vcpu pinning, scheduler information and NU= MA - assignment. Note that the vcpu ID as seen in the guest may differ = from - libvirt ID in certain cases. Valid IDs are from 0 to the maximum v= cpu + in other places such as vCPU pinning, scheduler information and NU= MA + assignment. Note that the vCPU ID as seen in the guest may differ = from + libvirt ID in certain cases. Valid IDs are from 0 to the maximum v= CPU count as set by the vcpu element minus 1. =20 The enabled attribute allows to control the state of = the - vcpu. Valid values are yes and no. + vCPU. Valid values are yes and no. =20 - hotpluggable controls whether given vcpu can be hotpl= ugged - and hotunplugged in cases when the cpu is enabled at boot. Note th= at - all disabled vcpus must be hotpluggable. Valid values are + hotpluggable controls whether given vCPU can be hotpl= ugged + and hotunplugged in cases when the CPU is enabled at boot. Note th= at + all disabled vCPUs must be hotpluggable. Valid values are yes and no. =20 - order allows to specify the order to add the online v= cpus. - For hypervisors/platforms that require to insert multiple vcpus at= once - the order may be duplicated across all vcpus that need to be - enabled at once. Specifying order is not necessary, vcpus are then + order allows to specify the order to add the online v= CPUs. + For hypervisors/platforms that require to insert multiple vCPUs at= once + the order may be duplicated across all vCPUs that need to be + enabled at once. Specifying order is not necessary, vCPUs are then added in an arbitrary order. If order info is used, it must be use= d for - all online vcpus. Hypervisors may clear or update ordering informa= tion + all online vCPUs. Hypervisors may clear or update ordering informa= tion during certain operations to assure valid configuration. =20 - Note that hypervisors may create hotpluggable vcpus differently fr= om - boot vcpus thus special initialization may be necessary. + Note that hypervisors may create hotpluggable vCPUs differently fr= om + boot vCPUs thus special initialization may be necessary. =20 - Hypervisors may require that vcpus enabled on boot which are not + Hypervisors may require that vCPUs enabled on boot which are not hotpluggable are clustered at the beginning starting with ID 0. It= may - be also required that vcpu 0 is always present and non-hotpluggabl= e. + be also required that vCPU 0 is always present and non-hotpluggabl= e. =20 - Note that providing state for individual cpus may be necessary to = enable + Note that providing state for individual CPUs may be necessary to = enable support of addressable vCPU hotplug and this feature may not be supported by all hypervisors. =20 - For QEMU the following conditions are required. Vcpu 0 needs to be - enabled and non-hotpluggable. On PPC64 along with it vcpus that ar= e in - the same core need to be enabled as well. All non-hotpluggable cpus - present at boot need to be grouped after vcpu 0. + For QEMU the following conditions are required. vCPU 0 needs to be + enabled and non-hotpluggable. On PPC64 along with it vCPUs that ar= e in + the same core need to be enabled as well. All non-hotpluggable CPUs + present at boot need to be grouped after vCPU 0. Since 2.2.0 (QEMU only)
@@ -774,11 +774,11 @@
vcpupin
The optional vcpupin element specifies which of host's - physical CPUs the domain VCPU will be pinned to. If this is omitte= d, + physical CPUs the domain vCPU will be pinned to. If this is omitte= d, and attribute cpuset of element vcpu is not specified, the vCPU is pinned to all the physical CPUs by defa= ult. It contains two required attributes, the attribute vcpu - specifies vcpu id, and the attribute cpuset is same as + specifies vCPU id, and the attribute cpuset is same as attribute cpuset of element vcpu. (NB: Only qemu driver support) Since 0.9.0 @@ -786,7 +786,7 @@
emulatorpin
The optional emulatorpin element specifies which of = host - physical CPUs the "emulator", a subset of a domain not including = vcpu + physical CPUs the "emulator", a subset of a domain not including = vCPU or iothreads will be pinned to. If this is omitted, and attribute cpuset of element vcpu is not specified, "emulator" is pinned to all the physical CPUs by default. It cont= ains @@ -820,7 +820,7 @@
period
The optional period element specifies the enforcement - interval(unit: microseconds). Within period, each vcp= u of + interval(unit: microseconds). Within period, each vCP= U of the domain will not be allowed to consume more than quota worth of runtime. The value should be in range [1000, 1000000]. A = period with value 0 means no value. @@ -835,7 +835,7 @@ vCPU threads, which means that it is not bandwidth controlled. The= value should be in range [1000, 18446744073709551] or less than 0. A quo= ta with value 0 means no value. You can use this feature to ensure th= at all - vcpus run at the same speed. + vCPUs run at the same speed. Only QEMU driver support since 0.9.4, LXC si= nce 0.9.10
@@ -864,7 +864,7 @@
The optional emulator_period element specifies the en= forcement interval(unit: microseconds). Within emulator_period,= emulator - threads(those excluding vcpus) of the domain will not be allowed t= o consume + threads(those excluding vCPUs) of the domain will not be allowed t= o consume more than emulator_quota worth of runtime. The value = should be in range [1000, 1000000]. A period with value 0 means no value. Only QEMU driver support since 0.10.0 @@ -873,9 +873,9 @@
The optional emulator_quota element specifies the max= imum allowed bandwidth(unit: microseconds) for domain's emulator thread= s(those - excluding vcpus). A domain with emulator_quota as any= negative + excluding vCPUs). A domain with emulator_quota as any= negative value indicates that the domain has infinite bandwidth for emulato= r threads - (those excluding vcpus), which means that it is not bandwidth cont= rolled. + (those excluding vCPUs), which means that it is not bandwidth cont= rolled. The value should be in range [1000, 18446744073709551] or less tha= n 0. A quota with value 0 means no value. Only QEMU driver support since 0.10.0 @@ -2131,13 +2131,13 @@ QEMU, the user-configurable extended TSEG feature was unavailabl= e up to and including pc-q35-2.9. Starting with pc-q35-2.10 the feature is available, with default = size - 16 MiB. That should suffice for up to roughly 272 VCPUs, 5 GiB = guest + 16 MiB. That should suffice for up to roughly 272 vCPUs, 5 GiB = guest RAM in total, no hotplug memory range, and 32 GiB of 64-bit PCI = MMIO - aperture. Or for 48 VCPUs, with 1TB of guest RAM, no hotplug DI= MM + aperture. Or for 48 vCPUs, with 1TB of guest RAM, no hotplug DI= MM range, and 32GB of 64-bit PCI MMIO aperture. The values may also= vary based on the loader the VM is using.

- Additional size might be needed for significantly higher VCPU co= unts + Additional size might be needed for significantly higher vCPU co= unts or increased address space (that can be memory, maxMemory, 64-bi= t PCI MMIO aperture size; roughly 8 MiB of TSEG per 1 TiB of address s= pace) which can also be rounded up. @@ -2147,7 +2147,7 @@ documentation of the guest OS or loader (if there is any), or te= st this by trial-and-error changing the value until the VM boots successfully. Yet another guiding value for users might be the = fact - that 48 MiB should be enough for pretty large guests (240 VCPUs = and + that 48 MiB should be enough for pretty large guests (240 vCPUs = and 4TB guest RAM), but it is on purpose not set as default as 48 Mi= B of unavailable RAM might be too much for small guests (e.g. with 51= 2 MiB of RAM). @@ -2425,7 +2425,7 @@ cpu_cycles - the count of cpu cycles (total/elapsed) + the count of CPU cycles (total/elapsed) perf.cpu_cycles @@ -2460,25 +2460,25 @@ stalled_cycles_frontend - the count of stalled cpu cycles in the frontend of the instructi= on + the count of stalled CPU cycles in the frontend of the instructi= on processor pipeline by applications running on the platform perf.stalled_cycles_frontend stalled_cycles_backend - the count of stalled cpu cycles in the backend of the instruction + the count of stalled CPU cycles in the backend of the instruction processor pipeline by applications running on the platform perf.stalled_cycles_backend ref_cpu_cycles - the count of total cpu cycles not affected by CPU frequency scal= ing + the count of total CPU cycles not affected by CPU frequency scal= ing by applications running on the platform perf.ref_cpu_cycles cpu_clock - the count of cpu clock time, as measured by a monotonic + the count of CPU clock time, as measured by a monotonic high-resolution per-CPU timer, by applications running on the platform perf.cpu_clock @@ -2505,7 +2505,7 @@ cpu_migrations - the count of cpu migrations, that is, where the process + the count of CPU migrations, that is, where the process moved from one logical processor to another, by applications running on the platform perf.cpu_migrations @@ -5621,8 +5621,8 @@ qemu-kvm -net nic,model=3D? /dev/null The resulting difference, according to the qemu developer who added the option is: "bh makes tx more asynchronous and reduces latency, but potentially causes more processor bandwidth - contention since the cpu doing the tx isn't necessarily the - cpu where the guest generated the packets."

+ contention since the CPU doing the tx isn't necessarily the + CPU where the guest generated the packets."

=20 In general you should leave this option alone, unless you are very certain you know what you are doing. --=20 2.14.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Apr 29 22:21:36 2024 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 1531917153271886.9767878158884; Wed, 18 Jul 2018 05:32:33 -0700 (PDT) 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 9FE02307D844; Wed, 18 Jul 2018 12:32:31 +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 56D65100191C; Wed, 18 Jul 2018 12:32:31 +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 F141D18037F3; Wed, 18 Jul 2018 12:32:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6ICVq7Z005327 for ; Wed, 18 Jul 2018 08:31:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id B7D112027047; Wed, 18 Jul 2018 12:31:52 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A75A2026D69; Wed, 18 Jul 2018 12:31:52 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Wed, 18 Jul 2018 14:31:38 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH v4 02/10] qemu: qemuBuildHostdevCommandLine: Use a helper variable mdevsrc 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com 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.48]); Wed, 18 Jul 2018 12:32:32 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Decrease the number of accessors we have to use. Signed-off-by: Erik Skultety Reviewed-by: J=EF=BF=BDn Tomko --- src/qemu/qemu_command.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 44ae8dcef7..c628ac3985 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5424,7 +5424,9 @@ qemuBuildHostdevCommandLine(virCommandPtr cmd, =20 /* MDEV */ if (virHostdevIsMdevDevice(hostdev)) { - switch ((virMediatedDeviceModelType) subsys->u.mdev.model) { + virDomainHostdevSubsysMediatedDevPtr mdevsrc =3D &subsys->u.md= ev; + + switch ((virMediatedDeviceModelType) mdevsrc->model) { case VIR_MDEV_MODEL_TYPE_VFIO_PCI: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VFIO_PCI)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -5432,6 +5434,7 @@ qemuBuildHostdevCommandLine(virCommandPtr cmd, "supported by this version of QEMU")); return -1; } + break; case VIR_MDEV_MODEL_TYPE_VFIO_CCW: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VFIO_CCW)) { --=20 2.14.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Apr 29 22:21:36 2024 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 1531917149390191.03676666267722; Wed, 18 Jul 2018 05:32:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BC7A6356C1; Wed, 18 Jul 2018 12:32: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 83712CAE9C; Wed, 18 Jul 2018 12:32: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 30DD318037F1; Wed, 18 Jul 2018 12:32:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6ICVriM005334 for ; Wed, 18 Jul 2018 08:31:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7FE282026D74; Wed, 18 Jul 2018 12:31:53 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 02A5B2026D69; Wed, 18 Jul 2018 12:31:52 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Wed, 18 Jul 2018 14:31:39 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH v4 03/10] qemu: caps: Introduce a capability for egl-headless 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 18 Jul 2018 12:32:28 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Since QEMU 2.10, it's possible to use a new type of display - egl-headless which uses drm nodes to provide OpenGL support. This patch adds a capability for that. However, since QEMU doesn't provide a QMP command to probe it, we have to base the capability on specific QEMU version. Signed-off-by: Erik Skultety Acked-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko Signed-off-by: Erik Skultety --- src/qemu/qemu_capabilities.c | 6 ++++++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 + 14 files changed, 19 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 23b483349f..df358f8967 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -503,6 +503,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "machine.pseries.cap-hpt-max-page-size", "machine.pseries.cap-htm", "usb-storage.werror", + "egl-headless", ); =20 =20 @@ -4030,6 +4031,11 @@ 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); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 1fa0ebfea3..55221e7e57 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -487,6 +487,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE, /* -machine pseries.c= ap-hpt-max-page-size */ QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, /* -machine pseries.cap-htm */ QEMU_CAPS_USB_STORAGE_WERROR, /* -device usb-storage,werror=3D..,rerro= r=3D.. */ + QEMU_CAPS_EGL_HEADLESS, /* -display egl-headless */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml b/tests/qem= ucapabilitiesdata/caps_2.10.0.aarch64.xml index 169641063c..a70e050765 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml @@ -159,6 +159,7 @@ + 2010000 0 307647 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml b/tests/qemuc= apabilitiesdata/caps_2.10.0.ppc64.xml index 92c095abd2..72709905d8 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml @@ -158,6 +158,7 @@ + 2010000 0 386992 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.10.0.s390x.xml index 5e22e21224..7347f5683f 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml @@ -119,6 +119,7 @@ + 2010000 0 307899 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.10.0.x86_64.xml index 10b066bff1..d69a148cd2 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml @@ -203,6 +203,7 @@ + 2010000 0 367995 diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.11.0.s390x.xml index 6ca2e57ef8..b359f9a049 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml @@ -126,6 +126,7 @@ + 2011000 0 346751 diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.11.0.x86_64.xml index c52e44a498..210f774c4e 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml @@ -207,6 +207,7 @@ + 2011000 0 371455 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qem= ucapabilitiesdata/caps_2.12.0.aarch64.xml index ecc029f403..80e7afec04 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml @@ -169,6 +169,7 @@ + 2011090 0 347550 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemuc= apabilitiesdata/caps_2.12.0.ppc64.xml index 7139179304..c4b09c0003 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml @@ -167,6 +167,7 @@ + 2011090 0 428334 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.12.0.s390x.xml index 87d189e58d..1ff2fe45e1 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml @@ -133,6 +133,7 @@ + 2012000 0 375999 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.12.0.x86_64.xml index 9c1f6c327c..37d17786cf 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -211,6 +211,7 @@ + 2011090 0 416196 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_3.0.0.ppc64.xml index 33cd00e613..57bf5dba11 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml @@ -167,6 +167,7 @@ + 2012050 0 446771 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_3.0.0.x86_64.xml index cd036d9323..431910a9e3 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml @@ -214,6 +214,7 @@ + 2012090 0 438109 --=20 2.14.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Apr 29 22:21:36 2024 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 1531917174593794.3494482903807; Wed, 18 Jul 2018 05:32:54 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2776A81DE6; Wed, 18 Jul 2018 12:32:52 +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 D20DA60C4E; Wed, 18 Jul 2018 12:32:51 +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 7A18C14B09; Wed, 18 Jul 2018 12:32:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6ICVsCT005342 for ; Wed, 18 Jul 2018 08:31:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 683B72027047; Wed, 18 Jul 2018 12:31:54 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id BFE662026D69; Wed, 18 Jul 2018 12:31:53 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Wed, 18 Jul 2018 14:31:40 +0200 Message-Id: <320803fccf120df4136ba6d6d95a058ab2911c95.1531916860.git.eskultet@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH v4 04/10] qemu: Introduce a new graphics display type 'headless' 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: , MIME-Version: 1.0 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 18 Jul 2018 12:32:53 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since 2.10 QEMU supports a new display type egl-headless which uses the drm nodes for OpenGL rendering copying back the rendered bits back to QEMU into a dma-buf which can be accessed by standard "display" apps like VNC or SPICE. Although this display type can be used on its own, for any practical use case it makes sense to pair it with either VNC or SPICE display. The clear benefit of this display is that VNC gains OpenGL support, which it natively doesn't have, and SPICE gains remote OpenGL support (native OpenGL support only works locally through a UNIX socket, i.e. listen type=3Dsocket/none) Signed-off-by: Erik Skultety Reviewed-by: J=EF=BF=BDn Tomko --- docs/formatdomain.html.in | 33 +++++++++++- docs/schemas/domaincommon.rng | 3 ++ src/conf/domain_conf.c | 6 ++- src/conf/domain_conf.h | 1 + src/libxl/libxl_conf.c | 1 + src/qemu/qemu_command.c | 14 ++++- src/qemu/qemu_domain.c | 60 ++++++++++++++++++= +++- src/qemu/qemu_driver.c | 2 + src/qemu/qemu_hotplug.c | 1 + src/qemu/qemu_process.c | 4 ++ src/vmx/vmx.c | 1 + tests/domaincapsschemadata/full.xml | 1 + tests/qemuxml2argvdata/graphics-egl-headless.args | 26 ++++++++++ tests/qemuxml2argvdata/graphics-egl-headless.xml | 31 +++++++++++ .../qemuxml2argvdata/graphics-sdl-egl-headless.xml | 35 +++++++++++++ .../graphics-spice-egl-headless.args | 31 +++++++++++ .../graphics-spice-egl-headless.xml | 36 +++++++++++++ .../graphics-spice-invalid-egl-headless.xml | 37 +++++++++++++ .../graphics-vnc-egl-headless.args | 28 ++++++++++ .../qemuxml2argvdata/graphics-vnc-egl-headless.xml | 37 +++++++++++++ tests/qemuxml2argvtest.c | 17 ++++++ .../graphics-spice-egl-headless.xml | 44 ++++++++++++++++ .../graphics-vnc-egl-headless.xml | 42 +++++++++++++++ tests/qemuxml2xmltest.c | 2 + 24 files changed, 488 insertions(+), 5 deletions(-) create mode 100644 tests/qemuxml2argvdata/graphics-egl-headless.args create mode 100644 tests/qemuxml2argvdata/graphics-egl-headless.xml create mode 100644 tests/qemuxml2argvdata/graphics-sdl-egl-headless.xml create mode 100644 tests/qemuxml2argvdata/graphics-spice-egl-headless.args create mode 100644 tests/qemuxml2argvdata/graphics-spice-egl-headless.xml create mode 100644 tests/qemuxml2argvdata/graphics-spice-invalid-egl-headl= ess.xml create mode 100644 tests/qemuxml2argvdata/graphics-vnc-egl-headless.args create mode 100644 tests/qemuxml2argvdata/graphics-vnc-egl-headless.xml create mode 100644 tests/qemuxml2xmloutdata/graphics-spice-egl-headless.xml create mode 100644 tests/qemuxml2xmloutdata/graphics-vnc-egl-headless.xml diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index d08ede9ab5..091888c879 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -6321,7 +6321,8 @@ qemu-kvm -net nic,model=3D? /dev/null

The graphics element has a mandatory type attribute which takes the value sdl, vnc, - spice, rdp or desktop: + spice, rdp, desktop or + egl-headless:

sdl
@@ -6380,6 +6381,11 @@ qemu-kvm -net nic,model=3D? /dev/null auto-allocation and autoport having no effect d= ue to security reasons) Since 1.0.6.

+

+ Although VNC doesn't support OpenGL natively, it can be pair= ed + with graphics type egl-headless (see below) whi= ch + will instruct QEMU to open and use drm nodes for OpenGL rend= ering. +

spice Since 0.8.6<= /dt>
@@ -6485,6 +6491,12 @@ qemu-kvm -net nic,model=3D? /dev/null You can enable or disable OpenGL support explicitly with the gl element, by setting the enable property. (QEMU only, since 1.3.3). + Note that this only works locally, since this requires usage= of + UNIX sockets, i.e. using listen types 'socket' = or + 'none'. For accelerated OpenGL with remote support, consider + pairing this element with type egl-headless + (see below). However, this will deliver weaker performance + compared to native Spice OpenGL support.

By default, QEMU will pick the first available GPU DRM rende= r node. @@ -6520,6 +6532,25 @@ qemu-kvm -net nic,model=3D? /dev/null fullscreen.

+
egl-headlessSince 4.6.0
+
+

+ This display type provides support for an OpenGL accelerated + display accessible both locally and remotely (for comparison, + Spice's native OpenGL support only works locally using UNIX + sockets at the moment, but has better performance). Since th= is + display type doesn't provide any window or graphical console= like + the other types, for practical reasons it should be paired w= ith + either vnc or spice graphics types. + This display type is only supported by QEMU domains + (needs QEMU 2.10 or newer) and = doesn't + accept any attributes. +

+
+<graphics type=3D'spice' autoport=3D'yes'/>
+<graphics type=3D'egl-headless'/>
+            
+
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index f24a56392a..157726752c 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -3366,6 +3366,9 @@ + + egl-headless + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7396616eda..89c6556026 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -615,7 +615,8 @@ VIR_ENUM_IMPL(virDomainGraphics, VIR_DOMAIN_GRAPHICS_TY= PE_LAST, "vnc", "rdp", "desktop", - "spice") + "spice", + "egl-headless") =20 VIR_ENUM_IMPL(virDomainGraphicsListen, VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_LAS= T, "none", @@ -1426,6 +1427,7 @@ void virDomainGraphicsDefFree(virDomainGraphicsDefPtr= def) virDomainGraphicsAuthDefClear(&def->data.spice.auth); break; =20 + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: case VIR_DOMAIN_GRAPHICS_TYPE_LAST: break; } @@ -14162,6 +14164,7 @@ virDomainGraphicsDefParseXML(xmlNodePtr node, if (virDomainGraphicsDefParseXMLSpice(def, node, ctxt, flags) < 0) goto error; break; + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: case VIR_DOMAIN_GRAPHICS_TYPE_LAST: break; } @@ -26394,6 +26397,7 @@ virDomainGraphicsDefFormat(virBufferPtr buf, virDomainGraphicsAuthDefFormatAttr(buf, &def->data.spice.auth, fla= gs); break; =20 + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: case VIR_DOMAIN_GRAPHICS_TYPE_LAST: break; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 0f10e242fd..26f75b15d0 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1473,6 +1473,7 @@ typedef enum { VIR_DOMAIN_GRAPHICS_TYPE_RDP, VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP, VIR_DOMAIN_GRAPHICS_TYPE_SPICE, + VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS, =20 VIR_DOMAIN_GRAPHICS_TYPE_LAST } virDomainGraphicsType; diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 452a77f3b8..cda4eb9d31 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -1441,6 +1441,7 @@ libxlMakeVfb(virPortAllocatorRangePtr graphicsports, case VIR_DOMAIN_GRAPHICS_TYPE_RDP: case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: case VIR_DOMAIN_GRAPHICS_TYPE_SPICE: + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: case VIR_DOMAIN_GRAPHICS_TYPE_LAST: break; } diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index c628ac3985..7c44045d61 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8216,6 +8216,7 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfig= Ptr cfg, return -1; } =20 + static int qemuBuildGraphicsCommandLine(virQEMUDriverConfigPtr cfg, virCommandPtr cmd, @@ -8245,6 +8246,11 @@ qemuBuildGraphicsCommandLine(virQEMUDriverConfigPtr = cfg, qemuCaps, graphics) < 0) return -1; =20 + break; + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: + virCommandAddArg(cmd, "-display"); + virCommandAddArg(cmd, "egl-headless"); + break; case VIR_DOMAIN_GRAPHICS_TYPE_RDP: case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: @@ -10072,6 +10078,7 @@ qemuBuildCommandLineValidate(virQEMUDriverPtr drive= r, int sdl =3D 0; int vnc =3D 0; int spice =3D 0; + int egl_headless =3D 0; =20 if (!virQEMUDriverIsPrivileged(driver)) { /* If we have no cgroups then we can have no tunings that @@ -10113,6 +10120,9 @@ qemuBuildCommandLineValidate(virQEMUDriverPtr drive= r, case VIR_DOMAIN_GRAPHICS_TYPE_SPICE: ++spice; break; + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: + ++egl_headless; + break; case VIR_DOMAIN_GRAPHICS_TYPE_RDP: case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: case VIR_DOMAIN_GRAPHICS_TYPE_LAST: @@ -10120,10 +10130,10 @@ qemuBuildCommandLineValidate(virQEMUDriverPtr dri= ver, } } =20 - if (sdl > 1 || vnc > 1 || spice > 1) { + if (sdl > 1 || vnc > 1 || spice > 1 || egl_headless > 1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("only 1 graphics device of each type " - "(sdl, vnc, spice) is supported")); + "(sdl, vnc, spice, headless) is supported")); return -1; } =20 diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ed76495309..ce252b47eb 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5528,6 +5528,60 @@ qemuDomainDeviceDefValidateTPM(virDomainTPMDef *tpm, } =20 =20 +static int +qemuDomainDeviceDefValidateGraphics(const virDomainGraphicsDef *graphics, + const virDomainDef *def, + virQEMUCapsPtr qemuCaps) +{ + bool have_egl_headless =3D false; + size_t i; + + for (i =3D 0; i < def->ngraphics; i++) { + graphics =3D def->graphics[i]; + + if (graphics->type =3D=3D VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS) { + 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 (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_EGL_HEADLESS)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("egl-headless display is not supported with t= his " + "QEMU binary")); + return -1; + } + + 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) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("graphics type 'egl-headless' is only support= ed " + "with one of: 'vnc', 'spice' graphics types")= ); + return -1; + } + + /* '-spice gl=3Don' and '-display egl-headless' are mutually + * exclusive + */ + if (graphics->type =3D=3D VIR_DOMAIN_GRAPHICS_TYPE_SPICE && + graphics->data.spice.gl =3D=3D VIR_TRISTATE_BOOL_YES) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("multiple OpenGL displays are not supported " + "by QEMU")); + return -1; + } + } + + return 0; +} + + static int qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev, const virDomainDef *def, @@ -5595,11 +5649,15 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDe= f *dev, ret =3D qemuDomainDeviceDefValidateTPM(dev->data.tpm, def); break; =20 + case VIR_DOMAIN_DEVICE_GRAPHICS: + ret =3D qemuDomainDeviceDefValidateGraphics(dev->data.graphics, de= f, + qemuCaps); + break; + case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_FS: case VIR_DOMAIN_DEVICE_INPUT: case VIR_DOMAIN_DEVICE_SOUND: - case VIR_DOMAIN_DEVICE_GRAPHICS: case VIR_DOMAIN_DEVICE_HUB: case VIR_DOMAIN_DEVICE_MEMBALLOON: case VIR_DOMAIN_DEVICE_NVRAM: diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 847dab2edc..cc25c8ef54 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -18104,6 +18104,7 @@ qemuDomainOpenGraphics(virDomainPtr dom, case VIR_DOMAIN_GRAPHICS_TYPE_SDL: case VIR_DOMAIN_GRAPHICS_TYPE_RDP: case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Can only open VNC or SPICE graphics backends, no= t %s"), virDomainGraphicsTypeToString(vm->def->graphics[idx= ]->type)); @@ -18172,6 +18173,7 @@ qemuDomainOpenGraphicsFD(virDomainPtr dom, case VIR_DOMAIN_GRAPHICS_TYPE_SDL: case VIR_DOMAIN_GRAPHICS_TYPE_RDP: case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Can only open VNC or SPICE graphics backends, no= t %s"), virDomainGraphicsTypeToString(vm->def->graphics[idx= ]->type)); diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 2b6633a998..978dd8af72 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -3702,6 +3702,7 @@ qemuDomainChangeGraphics(virQEMUDriverPtr driver, case VIR_DOMAIN_GRAPHICS_TYPE_SDL: case VIR_DOMAIN_GRAPHICS_TYPE_RDP: case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: virReportError(VIR_ERR_INTERNAL_ERROR, _("unable to change config on '%s' graphics type"),= type); break; diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index c903a8e5c8..a4b1f97df5 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4467,6 +4467,7 @@ qemuProcessGraphicsReservePorts(virDomainGraphicsDefP= tr graphics, case VIR_DOMAIN_GRAPHICS_TYPE_SDL: case VIR_DOMAIN_GRAPHICS_TYPE_RDP: case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: case VIR_DOMAIN_GRAPHICS_TYPE_LAST: break; } @@ -4505,6 +4506,7 @@ qemuProcessGraphicsAllocatePorts(virQEMUDriverPtr dri= ver, case VIR_DOMAIN_GRAPHICS_TYPE_SDL: case VIR_DOMAIN_GRAPHICS_TYPE_RDP: case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: case VIR_DOMAIN_GRAPHICS_TYPE_LAST: break; } @@ -4657,6 +4659,7 @@ qemuProcessGraphicsSetupListen(virQEMUDriverPtr drive= r, case VIR_DOMAIN_GRAPHICS_TYPE_SDL: case VIR_DOMAIN_GRAPHICS_TYPE_RDP: case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: case VIR_DOMAIN_GRAPHICS_TYPE_LAST: break; } @@ -4944,6 +4947,7 @@ qemuProcessStartValidateGraphics(virDomainObjPtr vm) case VIR_DOMAIN_GRAPHICS_TYPE_SDL: case VIR_DOMAIN_GRAPHICS_TYPE_RDP: case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: case VIR_DOMAIN_GRAPHICS_TYPE_LAST: break; } diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index fe24b060d7..937bf0c96b 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -3282,6 +3282,7 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOp= tionPtr xmlopt, virDomainDe case VIR_DOMAIN_GRAPHICS_TYPE_RDP: case VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP: case VIR_DOMAIN_GRAPHICS_TYPE_SPICE: + case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported graphics type '%s'"), virDomainGraphicsTypeToString(def->graphics[i]-= >type)); diff --git a/tests/domaincapsschemadata/full.xml b/tests/domaincapsschemada= ta/full.xml index d3faf38da0..154c4a6fe9 100644 --- a/tests/domaincapsschemadata/full.xml +++ b/tests/domaincapsschemadata/full.xml @@ -59,6 +59,7 @@ rdp desktop spice + egl-headless