From nobody Sun May 5 06:21:05 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 1551915443062206.41599558769997; Wed, 6 Mar 2019 15:37:23 -0800 (PST) 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 9858C308339E; Wed, 6 Mar 2019 23:37:20 +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 B2C0F1001E60; Wed, 6 Mar 2019 23:37:19 +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 4367E41F3D; Wed, 6 Mar 2019 23:37:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x26NbFlZ005156 for ; Wed, 6 Mar 2019 18:37:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id DEE2E1001DFB; Wed, 6 Mar 2019 23:37:15 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-121-104.rdu2.redhat.com [10.10.121.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 78C831001DE2; Wed, 6 Mar 2019 23:37:15 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 6 Mar 2019 18:36:50 -0500 Message-Id: <135b87f1280c46b2b0fbd930fa8c5fbeb00bbdb1.1551914794.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 01/16] tests: domcaps: Add a default 'empty' test 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.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.44]); Wed, 06 Mar 2019 23:37:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The 'empty' demonstrates XML generated when only bare minimum caps data has been filled in. This will demonstrate changes that alter the default XML output. Signed-off-by: Cole Robinson --- tests/domaincapsschemadata/empty.xml | 25 +++++++++++++++++++++++++ tests/domaincapstest.c | 3 +++ 2 files changed, 28 insertions(+) create mode 100644 tests/domaincapsschemadata/empty.xml diff --git a/tests/domaincapsschemadata/empty.xml b/tests/domaincapsschemad= ata/empty.xml new file mode 100644 index 0000000000..2b2e97d3b3 --- /dev/null +++ b/tests/domaincapsschemadata/empty.xml @@ -0,0 +1,25 @@ + + /bin/emulatorbin + kvm + my-machine-type + x86_64 + + + + + + + + + + + + + + + + + + diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 3be2806a48..b5bf4c234f 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -433,6 +433,9 @@ mymain(void) VIR_FREE(name); \ } while (0) =20 + DO_TEST("empty", "/bin/emulatorbin", "my-machine-type", + "x86_64", VIR_DOMAIN_VIRT_KVM, CAPS_NONE); + #if WITH_QEMU =20 DO_TEST_QEMU("1.7.0", "caps_1.7.0", --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 06:21:05 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 1551915442981778.9770024886042; Wed, 6 Mar 2019 15:37:22 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0D27C318A5E3; Wed, 6 Mar 2019 23:37:21 +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 D2739600C5; Wed, 6 Mar 2019 23:37:20 +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 546C7181A12C; Wed, 6 Mar 2019 23:37:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x26NbGnc005166 for ; Wed, 6 Mar 2019 18:37:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7C9291001DFB; Wed, 6 Mar 2019 23:37:16 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-121-104.rdu2.redhat.com [10.10.121.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1834F1001DE2; Wed, 6 Mar 2019 23:37:15 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 6 Mar 2019 18:36:51 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 02/16] tests: domcaps: Remove unused typedef 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Wed, 06 Mar 2019 23:37:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Cole Robinson --- tests/domaincapstest.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index b5bf4c234f..02f33d9f00 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -24,9 +24,6 @@ =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 -typedef int (*virDomainCapsFill)(virDomainCapsPtr domCaps, - void *opaque); - #define SET_ALL_BITS(x) \ memset(&(x.values), 0xff, sizeof(x.values)) =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 06:21:05 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 1551915458719947.3142332149913; Wed, 6 Mar 2019 15:37:38 -0800 (PST) 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 0A79180F81; Wed, 6 Mar 2019 23:37:37 +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 DB59E1900E; Wed, 6 Mar 2019 23:37:36 +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 9A164181A138; Wed, 6 Mar 2019 23:37:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x26NbH5w005173 for ; Wed, 6 Mar 2019 18:37:17 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1C28D1001DFB; Wed, 6 Mar 2019 23:37:17 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-121-104.rdu2.redhat.com [10.10.121.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB3611001DE2; Wed, 6 Mar 2019 23:37:16 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 6 Mar 2019 18:36:52 -0500 Message-Id: <3e1a0a53d59172fa656e07f28c9232cf69d1e67b.1551914794.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 03/16] tests: domcaps: Remove 'full' test 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 06 Mar 2019 23:37:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The 'full' test verifies the output of a virDomainCapsPtr built by hand. It has the following problems: The domcaps test suite nowadays has 3 hypervisor driver implementations which should give us plenty of opportunity to get full domcaps coverage. I don't think this test has much value. And it has the following issues: - Requires manual intervention to test new domcaps XML, which is easy to miss, for example gic bits aren't covered there. - The SET_ALL_BITS trick it uses to fill in enums will output values that are never reported by any driver implementation (strings like 'default') Let's remove it Signed-off-by: Cole Robinson --- tests/domaincapsschemadata/full.xml | 123 ---------------------------- tests/domaincapstest.c | 73 ----------------- 2 files changed, 196 deletions(-) delete mode 100644 tests/domaincapsschemadata/full.xml diff --git a/tests/domaincapsschemadata/full.xml b/tests/domaincapsschemada= ta/full.xml deleted file mode 100644 index 28263466a4..0000000000 --- a/tests/domaincapsschemadata/full.xml +++ /dev/null @@ -1,123 +0,0 @@ - - /bin/emulatorbin - kvm - my-machine-type - x86_64 - - - - - /foo/bar - /tmp/my_path - - rom - pflash - - - default - yes - no - - - - - - - host - CPU Vendorrr - - - Model1 - Model2 - Model3 - - - - - - disk - cdrom - floppy - lun - - - ide - fdc - scsi - virtio - xen - usb - uml - sata - sd - - - default - virtio - virtio-transitional - virtio-non-transitional - - - - - sdl - vnc - rdp - desktop - spice - egl-headless - - - - - - subsystem - capabilities - - - default - mandatory - requisite - optional - - - usb - pci - scsi - scsi_host - mdev - - - storage - misc - net - - - default - kvm - vfio - xen - - - - - - - - - - diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 02f33d9f00..1aa8c023a2 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -24,9 +24,6 @@ =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 -#define SET_ALL_BITS(x) \ - memset(&(x.values), 0xff, sizeof(x.values)) - static int ATTRIBUTE_SENTINEL fillStringValues(virDomainCapsStringValuesPtr values, ...) { @@ -48,67 +45,6 @@ fillStringValues(virDomainCapsStringValuesPtr values, ..= .) return ret; } =20 -static int -fillAllCaps(virDomainCapsPtr domCaps) -{ - virDomainCapsOSPtr os =3D &domCaps->os; - virDomainCapsLoaderPtr loader =3D &os->loader; - virDomainCapsCPUPtr cpu =3D &domCaps->cpu; - virDomainCapsDeviceDiskPtr disk =3D &domCaps->disk; - virDomainCapsDeviceGraphicsPtr graphics =3D &domCaps->graphics; - virDomainCapsDeviceVideoPtr video =3D &domCaps->video; - virDomainCapsDeviceHostdevPtr hostdev =3D &domCaps->hostdev; - virCPUDef host =3D { - .type =3D VIR_CPU_TYPE_HOST, - .arch =3D VIR_ARCH_X86_64, - .model =3D (char *) "host", - .vendor =3D (char *) "CPU Vendorrr", - }; - - domCaps->maxvcpus =3D 255; - os->supported =3D true; - - loader->supported =3D true; - SET_ALL_BITS(loader->type); - SET_ALL_BITS(loader->readonly); - if (fillStringValues(&loader->values, - "/foo/bar", - "/tmp/my_path", - NULL) < 0) - return -1; - - cpu->hostPassthrough =3D true; - cpu->hostModel =3D virCPUDefCopy(&host); - if (!(cpu->custom =3D virDomainCapsCPUModelsNew(3)) || - virDomainCapsCPUModelsAdd(cpu->custom, "Model1", -1, - VIR_DOMCAPS_CPU_USABLE_UNKNOWN, NULL) < = 0 || - virDomainCapsCPUModelsAdd(cpu->custom, "Model2", -1, - VIR_DOMCAPS_CPU_USABLE_NO, NULL) < 0 || - virDomainCapsCPUModelsAdd(cpu->custom, "Model3", -1, - VIR_DOMCAPS_CPU_USABLE_YES, NULL) < 0) - return -1; - - disk->supported =3D true; - SET_ALL_BITS(disk->diskDevice); - SET_ALL_BITS(disk->bus); - SET_ALL_BITS(disk->model); - - graphics->supported =3D true; - SET_ALL_BITS(graphics->type); - - video->supported =3D true; - SET_ALL_BITS(video->modelType); - - hostdev->supported =3D true; - SET_ALL_BITS(hostdev->mode); - SET_ALL_BITS(hostdev->startupPolicy); - SET_ALL_BITS(hostdev->subsysType); - SET_ALL_BITS(hostdev->capsType); - SET_ALL_BITS(hostdev->pciBackend); - return 0; -} - - #if WITH_QEMU # include "testutilsqemu.h" # include "testutilshostcpus.h" @@ -258,7 +194,6 @@ fillBhyveCaps(virDomainCapsPtr domCaps, unsigned int *b= hyve_caps) =20 enum testCapsType { CAPS_NONE, - CAPS_ALL, CAPS_QEMU, CAPS_LIBXL, CAPS_BHYVE, @@ -297,11 +232,6 @@ test_virDomainCapsFormat(const void *opaque) case CAPS_NONE: break; =20 - case CAPS_ALL: - if (fillAllCaps(domCaps) < 0) - goto cleanup; - break; - case CAPS_QEMU: #if WITH_QEMU if (fillQemuCaps(domCaps, data->capsName, data->arch, data->machin= e, @@ -407,9 +337,6 @@ mymain(void) ret =3D -1; \ } while (0) =20 - DO_TEST("full", "/bin/emulatorbin", "my-machine-type", - "x86_64", VIR_DOMAIN_VIRT_KVM, CAPS_ALL); - #define DO_TEST_BHYVE(Name, Emulator, BhyveCaps, Type) \ do { \ char *name =3D NULL; \ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 06:21:05 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 1551915459037818.2102056629132; Wed, 6 Mar 2019 15:37:39 -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 0A4EF81E05; Wed, 6 Mar 2019 23:37:37 +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 D93E91891B; Wed, 6 Mar 2019 23:37:36 +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 94EFD3FB12; Wed, 6 Mar 2019 23:37:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x26NbHrM005181 for ; Wed, 6 Mar 2019 18:37:17 -0500 Received: by smtp.corp.redhat.com (Postfix) id B0CB91001DFB; Wed, 6 Mar 2019 23:37:17 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-121-104.rdu2.redhat.com [10.10.121.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4AADF1001DE2; Wed, 6 Mar 2019 23:37:17 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 6 Mar 2019 18:36:53 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 04/16] conf: domcaps: Add single line formatting macro 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.25]); Wed, 06 Mar 2019 23:37:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Similar to the macros we have for formatting enums, add a macro to simplify formatting the pattern: Signed-off-by: Cole Robinson --- src/conf/domain_capabilities.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index a6104920ab..5a26329176 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -384,6 +384,12 @@ virDomainCapsStringValuesFormat(virBufferPtr buf, virBufferAddLit(buf, "\n"); \ } while (0) =20 +#define FORMAT_SINGLE(name, supported) \ + do { \ + virBufferAsprintf(&buf, "<%s supported=3D'%s'/>\n", name, \ + supported ? "yes" : "no"); \ + } while (0) + #define ENUM_PROCESS(master, capsEnum, valToStr) \ do { \ virDomainCapsEnumFormat(buf, &master->capsEnum, \ @@ -594,8 +600,7 @@ virDomainCapsFormat(virDomainCapsPtr const caps) if (caps->maxvcpus) virBufferAsprintf(&buf, "\n", caps->maxvcpus); =20 - virBufferAsprintf(&buf, "\n", - caps->iothreads ? "yes" : "no"); + FORMAT_SINGLE("iothreads", caps->iothreads); =20 virDomainCapsOSFormat(&buf, &caps->os); virDomainCapsCPUFormat(&buf, &caps->cpu); @@ -615,11 +620,8 @@ virDomainCapsFormat(virDomainCapsPtr const caps) virBufferAdjustIndent(&buf, 2); =20 virDomainCapsFeatureGICFormat(&buf, &caps->gic); - virBufferAsprintf(&buf, "\n", - caps->vmcoreinfo ? "yes" : "no"); - - virBufferAsprintf(&buf, "\n", - caps->genid ? "yes" : "no"); + FORMAT_SINGLE("vmcoreinfo", caps->vmcoreinfo); + FORMAT_SINGLE("genid", caps->genid); virDomainCapsFeatureSEVFormat(&buf, caps->sev); =20 virBufferAdjustIndent(&buf, -2); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 06:21:05 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 1551915462598827.2774999256724; Wed, 6 Mar 2019 15:37:42 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 62731C071887; Wed, 6 Mar 2019 23:37:40 +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 3D7335D78F; Wed, 6 Mar 2019 23:37:40 +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 EFA7E181A13E; Wed, 6 Mar 2019 23:37:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x26NbI3e005188 for ; Wed, 6 Mar 2019 18:37:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5367B1001DFB; Wed, 6 Mar 2019 23:37:18 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-121-104.rdu2.redhat.com [10.10.121.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1C6B1001DE2; Wed, 6 Mar 2019 23:37:17 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 6 Mar 2019 18:36:54 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 05/16] conf: domcaps: use virTristateBool for 'supported' 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 06 Mar 2019 23:37:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Switch most 'supported' handling to use virTristateBool, so eventually we can handle the ABSENT state. For now the XML formatter treats ABSENT the same as FALSE, so there's no functional output change. This will be addressed in later patches Signed-off-by: Cole Robinson --- src/bhyve/bhyve_capabilities.c | 10 +++++----- src/conf/domain_capabilities.c | 8 ++++---- src/conf/domain_capabilities.h | 20 ++++++++++---------- src/libxl/libxl_capabilities.c | 12 ++++++------ src/qemu/qemu_capabilities.c | 24 +++++++++++++----------- 5 files changed, 38 insertions(+), 36 deletions(-) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c index 6feaded2ad..79d7659da3 100644 --- a/src/bhyve/bhyve_capabilities.c +++ b/src/bhyve/bhyve_capabilities.c @@ -75,7 +75,7 @@ virBhyveDomainCapsFill(virDomainCapsPtr caps, unsigned int bhyvecaps, virDomainCapsStringValuesPtr firmwares) { - caps->disk.supported =3D true; + caps->disk.supported =3D VIR_TRISTATE_BOOL_YES; VIR_DOMAIN_CAPS_ENUM_SET(caps->disk.diskDevice, VIR_DOMAIN_DISK_DEVICE_DISK, VIR_DOMAIN_DISK_DEVICE_CDROM); @@ -84,10 +84,10 @@ virBhyveDomainCapsFill(virDomainCapsPtr caps, VIR_DOMAIN_DISK_BUS_SATA, VIR_DOMAIN_DISK_BUS_VIRTIO); =20 - caps->os.supported =3D true; + caps->os.supported =3D VIR_TRISTATE_BOOL_YES; =20 if (bhyvecaps & BHYVE_CAP_LPC_BOOTROM) { - caps->os.loader.supported =3D true; + caps->os.loader.supported =3D VIR_TRISTATE_BOOL_YES; VIR_DOMAIN_CAPS_ENUM_SET(caps->os.loader.type, VIR_DOMAIN_LOADER_TYPE_PFLASH); VIR_DOMAIN_CAPS_ENUM_SET(caps->os.loader.readonly, @@ -99,8 +99,8 @@ virBhyveDomainCapsFill(virDomainCapsPtr caps, =20 =20 if (bhyvecaps & BHYVE_CAP_FBUF) { - caps->graphics.supported =3D true; - caps->video.supported =3D true; + caps->graphics.supported =3D VIR_TRISTATE_BOOL_YES; + caps->video.supported =3D VIR_TRISTATE_BOOL_YES; VIR_DOMAIN_CAPS_ENUM_SET(caps->graphics.type, VIR_DOMAIN_GRAPHICS_= TYPE_VNC); VIR_DOMAIN_CAPS_ENUM_SET(caps->video.modelType, VIR_DOMAIN_VIDEO_T= YPE_GOP); } diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 5a26329176..081549eefb 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -371,9 +371,9 @@ virDomainCapsStringValuesFormat(virBufferPtr buf, #define FORMAT_PROLOGUE(item) \ do { \ virBufferAsprintf(buf, "<" #item " supported=3D'%s'%s\n", \ - item->supported ? "yes" : "no", \ - item->supported ? ">" : "/>"); \ - if (!item->supported) \ + (item->supported =3D=3D VIR_TRISTATE_BOOL_YES) ? "yes" : "= no", \ + (item->supported =3D=3D VIR_TRISTATE_BOOL_YES) ? ">" : "/>= "); \ + if (item->supported !=3D VIR_TRISTATE_BOOL_YES) \ return; \ virBufferAdjustIndent(buf, 2); \ } while (0) @@ -387,7 +387,7 @@ virDomainCapsStringValuesFormat(virBufferPtr buf, #define FORMAT_SINGLE(name, supported) \ do { \ virBufferAsprintf(&buf, "<%s supported=3D'%s'/>\n", name, \ - supported ? "yes" : "no"); \ + (supported =3D=3D VIR_TRISTATE_BOOL_YES) ? "yes" : "no"); \ } while (0) =20 #define ENUM_PROCESS(master, capsEnum, valToStr) \ diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index b5387916a1..3282b47d52 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -46,7 +46,7 @@ struct _virDomainCapsStringValues { typedef struct _virDomainCapsLoader virDomainCapsLoader; typedef virDomainCapsLoader *virDomainCapsLoaderPtr; struct _virDomainCapsLoader { - bool supported; + virTristateBool supported; virDomainCapsStringValues values; /* Info about values for the eleme= nt */ virDomainCapsEnum type; /* Info about virDomainLoader */ virDomainCapsEnum readonly; /* Info about readonly:virTristateBool */ @@ -55,14 +55,14 @@ struct _virDomainCapsLoader { typedef struct _virDomainCapsOS virDomainCapsOS; typedef virDomainCapsOS *virDomainCapsOSPtr; struct _virDomainCapsOS { - bool supported; + virTristateBool supported; virDomainCapsLoader loader; /* Info about virDomainLoaderDef */ }; =20 typedef struct _virDomainCapsDeviceDisk virDomainCapsDeviceDisk; typedef virDomainCapsDeviceDisk *virDomainCapsDeviceDiskPtr; struct _virDomainCapsDeviceDisk { - bool supported; + virTristateBool supported; virDomainCapsEnum diskDevice; /* Info about virDomainDiskDevice enum= values */ virDomainCapsEnum bus; /* Info about virDomainDiskBus enum va= lues */ virDomainCapsEnum model; /* Info about virDomainDiskModel enum = values */ @@ -72,21 +72,21 @@ struct _virDomainCapsDeviceDisk { typedef struct _virDomainCapsDeviceGraphics virDomainCapsDeviceGraphics; typedef virDomainCapsDeviceGraphics *virDomainCapsDeviceGraphicsPtr; struct _virDomainCapsDeviceGraphics { - bool supported; + virTristateBool supported; virDomainCapsEnum type; /* virDomainGraphicsType */ }; =20 typedef struct _virDomainCapsDeviceVideo virDomainCapsDeviceVideo; typedef virDomainCapsDeviceVideo *virDomainCapsDeviceVideoPtr; struct _virDomainCapsDeviceVideo { - bool supported; + virTristateBool supported; virDomainCapsEnum modelType; /* virDomainVideoType */ }; =20 typedef struct _virDomainCapsDeviceHostdev virDomainCapsDeviceHostdev; typedef virDomainCapsDeviceHostdev *virDomainCapsDeviceHostdevPtr; struct _virDomainCapsDeviceHostdev { - bool supported; + virTristateBool supported; virDomainCapsEnum mode; /* Info about virDomainHostdevMode= */ virDomainCapsEnum startupPolicy; /* Info about virDomainStartupPoli= cy */ virDomainCapsEnum subsysType; /* Info about virDomainHostdevSubs= ysType */ @@ -98,7 +98,7 @@ struct _virDomainCapsDeviceHostdev { typedef struct _virDomainCapsFeatureGIC virDomainCapsFeatureGIC; typedef virDomainCapsFeatureGIC *virDomainCapsFeatureGICPtr; struct _virDomainCapsFeatureGIC { - bool supported; + virTristateBool supported; virDomainCapsEnum version; /* Info about virGICVersion */ }; =20 @@ -156,7 +156,7 @@ struct _virDomainCaps { =20 /* Some machine specific info */ int maxvcpus; - bool iothreads; /* Whether I/O threads are supported or not. */ + virTristateBool iothreads; /* Whether I/O threads are supported or no= t. */ =20 virDomainCapsOS os; virDomainCapsCPU cpu; @@ -167,8 +167,8 @@ struct _virDomainCaps { /* add new domain devices here */ =20 virDomainCapsFeatureGIC gic; - bool vmcoreinfo; - bool genid; + virTristateBool vmcoreinfo; + virTristateBool genid; virSEVCapabilityPtr sev; /* add new domain features here */ }; diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index cc42dc6987..385b08be38 100644 --- a/src/libxl/libxl_capabilities.c +++ b/src/libxl/libxl_capabilities.c @@ -603,12 +603,12 @@ libxlMakeDomainOSCaps(const char *machine, virDomainCapsLoaderPtr capsLoader =3D &os->loader; size_t i; =20 - os->supported =3D true; + os->supported =3D VIR_TRISTATE_BOOL_YES; =20 if (STREQ(machine, "xenpv") || STREQ(machine, "xenpvh")) return 0; =20 - capsLoader->supported =3D true; + capsLoader->supported =3D VIR_TRISTATE_BOOL_YES; if (VIR_ALLOC_N(capsLoader->values.values, nfirmwares) < 0) return -1; =20 @@ -631,7 +631,7 @@ libxlMakeDomainOSCaps(const char *machine, static int libxlMakeDomainDeviceDiskCaps(virDomainCapsDeviceDiskPtr dev) { - dev->supported =3D true; + dev->supported =3D VIR_TRISTATE_BOOL_YES; =20 VIR_DOMAIN_CAPS_ENUM_SET(dev->diskDevice, VIR_DOMAIN_DISK_DEVICE_DISK, @@ -648,7 +648,7 @@ libxlMakeDomainDeviceDiskCaps(virDomainCapsDeviceDiskPt= r dev) static int libxlMakeDomainDeviceGraphicsCaps(virDomainCapsDeviceGraphicsPtr dev) { - dev->supported =3D true; + dev->supported =3D VIR_TRISTATE_BOOL_YES; =20 VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_SDL, @@ -661,7 +661,7 @@ libxlMakeDomainDeviceGraphicsCaps(virDomainCapsDeviceGr= aphicsPtr dev) static int libxlMakeDomainDeviceVideoCaps(virDomainCapsDeviceVideoPtr dev) { - dev->supported =3D true; + dev->supported =3D VIR_TRISTATE_BOOL_YES; =20 VIR_DOMAIN_CAPS_ENUM_SET(dev->modelType, VIR_DOMAIN_VIDEO_TYPE_VGA, @@ -683,7 +683,7 @@ bool libxlCapsHasPVUSB(void) static int libxlMakeDomainDeviceHostdevCaps(virDomainCapsDeviceHostdevPtr dev) { - dev->supported =3D true; + dev->supported =3D VIR_TRISTATE_BOOL_YES; /* VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES is for containers only */ VIR_DOMAIN_CAPS_ENUM_SET(dev->mode, VIR_DOMAIN_HOSTDEV_MODE_SUBSYS); diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c9700193fd..6a0ec0d1bd 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4918,7 +4918,7 @@ virQEMUCapsFillDomainLoaderCaps(virDomainCapsLoaderPt= r capsLoader, { size_t i; =20 - capsLoader->supported =3D true; + capsLoader->supported =3D VIR_TRISTATE_BOOL_YES; =20 if (VIR_ALLOC_N(capsLoader->values.values, nfirmwares) < 0) return -1; @@ -4958,7 +4958,7 @@ virQEMUCapsFillDomainOSCaps(virDomainCapsOSPtr os, { virDomainCapsLoaderPtr capsLoader =3D &os->loader; =20 - os->supported =3D true; + os->supported =3D VIR_TRISTATE_BOOL_YES; if (virQEMUCapsFillDomainLoaderCaps(capsLoader, firmwares, nfirmwares)= < 0) return -1; return 0; @@ -5011,7 +5011,8 @@ static int virQEMUCapsFillDomainIOThreadCaps(virQEMUCapsPtr qemuCaps, virDomainCapsPtr domCaps) { - domCaps->iothreads =3D virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_IOTHR= EAD); + domCaps->iothreads =3D virTristateBoolFromBool( + virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_IOTHREAD)); =20 return 0; } @@ -5022,7 +5023,7 @@ virQEMUCapsFillDomainDeviceDiskCaps(virQEMUCapsPtr qe= muCaps, const char *machine, virDomainCapsDeviceDiskPtr disk) { - disk->supported =3D true; + disk->supported =3D VIR_TRISTATE_BOOL_YES; /* QEMU supports all of these */ VIR_DOMAIN_CAPS_ENUM_SET(disk->diskDevice, VIR_DOMAIN_DISK_DEVICE_DISK, @@ -5067,7 +5068,7 @@ static int virQEMUCapsFillDomainDeviceGraphicsCaps(virQEMUCapsPtr qemuCaps, virDomainCapsDeviceGraphicsPtr dev) { - dev->supported =3D true; + dev->supported =3D VIR_TRISTATE_BOOL_YES; =20 VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_SDL); if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VNC)) @@ -5083,7 +5084,7 @@ static int virQEMUCapsFillDomainDeviceVideoCaps(virQEMUCapsPtr qemuCaps, virDomainCapsDeviceVideoPtr dev) { - dev->supported =3D true; + dev->supported =3D VIR_TRISTATE_BOOL_YES; =20 if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VGA)) VIR_DOMAIN_CAPS_ENUM_SET(dev->modelType, VIR_DOMAIN_VIDEO_TYPE_VGA= ); @@ -5107,7 +5108,7 @@ virQEMUCapsFillDomainDeviceHostdevCaps(virQEMUCapsPtr= qemuCaps, bool supportsPassthroughKVM =3D qemuHostdevHostSupportsPassthroughLega= cy(); bool supportsPassthroughVFIO =3D qemuHostdevHostSupportsPassthroughVFI= O(); =20 - hostdev->supported =3D true; + hostdev->supported =3D VIR_TRISTATE_BOOL_YES; /* VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES is for containers only */ VIR_DOMAIN_CAPS_ENUM_SET(hostdev->mode, VIR_DOMAIN_HOSTDEV_MODE_SUBSYS); @@ -5222,7 +5223,7 @@ virQEMUCapsFillDomainFeatureGICCaps(virQEMUCapsPtr qe= muCaps, version)) continue; =20 - gic->supported =3D true; + gic->supported =3D VIR_TRISTATE_BOOL_YES; VIR_DOMAIN_CAPS_ENUM_SET(gic->version, version); } @@ -5293,10 +5294,11 @@ virQEMUCapsFillDomainCaps(virCapsPtr caps, domCaps->maxvcpus =3D MIN(domCaps->maxvcpus, hostmaxvcpus); } =20 - domCaps->vmcoreinfo =3D virQEMUCapsGet(qemuCaps, - QEMU_CAPS_DEVICE_VMCOREINFO); + domCaps->vmcoreinfo =3D virTristateBoolFromBool( + virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VMCOREINFO)); =20 - domCaps->genid =3D virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VMGENID); + domCaps->genid =3D virTristateBoolFromBool( + virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VMGENID)); =20 if (virQEMUCapsFillDomainOSCaps(os, firmwares, nfirmwares) < 0 || virQEMUCapsFillDomainCPUCaps(caps, qemuCaps, domCaps) < 0 || --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 06:21:05 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 1551915462155812.0436375545584; Wed, 6 Mar 2019 15:37:42 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8885F80F83; Wed, 6 Mar 2019 23:37:40 +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 60C025D719; Wed, 6 Mar 2019 23:37:40 +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 1E9BF181A1E6; Wed, 6 Mar 2019 23:37:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x26NbIpi005193 for ; Wed, 6 Mar 2019 18:37:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id E70E81001E61; Wed, 6 Mar 2019 23:37:18 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-121-104.rdu2.redhat.com [10.10.121.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 825DE1001DE2; Wed, 6 Mar 2019 23:37:18 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 6 Mar 2019 18:36:55 -0500 Message-Id: <4d626a58bd7f54bd4e367542d7ed0276bbf14961.1551914794.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 06/16] qemu: domcaps: fill in explicit supported BOOL_NO 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 06 Mar 2019 23:37:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Only gic->supported needs an explicit BOOL_NO setting, all other 'supported' values are handling things correctly Signed-off-by: Cole Robinson --- src/qemu/qemu_capabilities.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 6a0ec0d1bd..3611fb92d8 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -5212,6 +5212,8 @@ virQEMUCapsFillDomainFeatureGICCaps(virQEMUCapsPtr qe= muCaps, virDomainCapsFeatureGICPtr gic =3D &domCaps->gic; virGICVersion version; =20 + gic->supported =3D VIR_TRISTATE_BOOL_NO; + if (!qemuDomainMachineIsARMVirt(domCaps->machine, domCaps->arch)) return 0; =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 06:21:05 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 1551915458816495.2935398564591; Wed, 6 Mar 2019 15:37:38 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 109F0C0467FA; Wed, 6 Mar 2019 23:37:37 +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 DC50B60141; Wed, 6 Mar 2019 23:37:36 +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 9AA4A181A13B; Wed, 6 Mar 2019 23:37:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x26NbJId005198 for ; Wed, 6 Mar 2019 18:37:19 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8655B1001E63; Wed, 6 Mar 2019 23:37:19 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-121-104.rdu2.redhat.com [10.10.121.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2223D1001E60; Wed, 6 Mar 2019 23:37:19 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 6 Mar 2019 18:36:56 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 07/16] libxl: domcaps: fill in explicit supported BOOL_NO 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 06 Mar 2019 23:37:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" None of the bits are supported, and the piece is only conditionally supported Signed-off-by: Cole Robinson --- src/libxl/libxl_capabilities.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index 385b08be38..672c1c7c66 100644 --- a/src/libxl/libxl_capabilities.c +++ b/src/libxl/libxl_capabilities.c @@ -604,6 +604,7 @@ libxlMakeDomainOSCaps(const char *machine, size_t i; =20 os->supported =3D VIR_TRISTATE_BOOL_YES; + capsLoader->supported =3D VIR_TRISTATE_BOOL_NO; =20 if (STREQ(machine, "xenpv") || STREQ(machine, "xenpvh")) return 0; @@ -773,6 +774,11 @@ libxlMakeDomainCapabilities(virDomainCapsPtr domCaps, libxlMakeDomainDeviceHostdevCaps(hostdev) < 0) return -1; =20 + domCaps->iothreads =3D VIR_TRISTATE_BOOL_NO; + domCaps->vmcoreinfo =3D VIR_TRISTATE_BOOL_NO; + domCaps->genid =3D VIR_TRISTATE_BOOL_NO; + domCaps->gic.supported =3D VIR_TRISTATE_BOOL_NO; + return 0; } =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 06:21:05 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 155191546585240.60557679732983; Wed, 6 Mar 2019 15:37:45 -0800 (PST) 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 311DD804F2; Wed, 6 Mar 2019 23:37:44 +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 118411902F; Wed, 6 Mar 2019 23:37:44 +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 C240B181A266; Wed, 6 Mar 2019 23:37:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x26NbKot005208 for ; Wed, 6 Mar 2019 18:37:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id 23D3C1001E64; Wed, 6 Mar 2019 23:37:20 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-121-104.rdu2.redhat.com [10.10.121.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4DF41001E61; Wed, 6 Mar 2019 23:37:19 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 6 Mar 2019 18:36:57 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 08/16] bhyve: domcaps: fill in explicit supported BOOL_NO 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 06 Mar 2019 23:37:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" and are not supported. , , and