From nobody Mon Apr 29 07:25:26 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 1528979304274667.0587665745069; Thu, 14 Jun 2018 05:28:24 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3A6BDC0587CD; Thu, 14 Jun 2018 12:28:23 +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 E696A2010CC0; Thu, 14 Jun 2018 12:28:22 +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 88D5141F54; Thu, 14 Jun 2018 12:28:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5ECSBQr008074 for ; Thu, 14 Jun 2018 08:28:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 979051C700; Thu, 14 Jun 2018 12:28:11 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1D23D7C4D; Thu, 14 Jun 2018 12:28:10 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Thu, 14 Jun 2018 14:28:02 +0200 Message-Id: <18006e92299d7759b1943bee3c3fad8544abf8f1.1528979218.git.eskultet@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 1/2] schema: Fix the definition of SEV in domain capabilities schema 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.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 14 Jun 2018 12:28:23 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The whole element was optional which it shouldn't be as if the platform doesn't support SEV we should format . Signed-off-by: Erik Skultety Reviewed-by: J=EF=BF=BDn Tomko --- docs/schemas/domaincaps.rng | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng index e25201fc68..ed29823548 100644 --- a/docs/schemas/domaincaps.rng +++ b/docs/schemas/domaincaps.rng @@ -185,9 +185,7 @@ - - - + @@ -213,12 +211,15 @@ =20 - - - - - - + + + + + + + + + =20 --=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 07:25:26 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 1528979311062802.9139245047136; Thu, 14 Jun 2018 05:28:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 86D40308FB82; Thu, 14 Jun 2018 12:28:29 +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 44C1F30A6ABB; Thu, 14 Jun 2018 12:28:29 +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 C8BD91800534; Thu, 14 Jun 2018 12:28:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5ECSCGt008079 for ; Thu, 14 Jun 2018 08:28:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 745921C702; Thu, 14 Jun 2018 12:28:12 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id D199C7C4D; Thu, 14 Jun 2018 12:28:11 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Thu, 14 Jun 2018 14:28:03 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 2/2] conf: Fix formatting of element in domain capabilities XML 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.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 14 Jun 2018 12:28:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We only formatted the element when QEMU supported the feature when in fact we should always format the element to make clear that libvirt knows about the feature and the fact whether it is or isn't supported depends on QEMU version, in other words if QEMU doesn't support the feature we're going to format the following into the domain capabilities XML: Signed-off-by: Erik Skultety Reviewed-by: J=EF=BF=BDn Tomko --- src/conf/domain_capabilities.c | 20 ++++++++++++----= ---- tests/domaincapsschemadata/basic.xml | 1 + tests/domaincapsschemadata/bhyve_basic.x86_64.xml | 1 + tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml | 1 + tests/domaincapsschemadata/bhyve_uefi.x86_64.xml | 1 + tests/domaincapsschemadata/full.xml | 1 + tests/domaincapsschemadata/libxl-xenfv-usb.xml | 1 + tests/domaincapsschemadata/libxl-xenfv.xml | 1 + tests/domaincapsschemadata/libxl-xenpv-usb.xml | 1 + tests/domaincapsschemadata/libxl-xenpv.xml | 1 + tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml | 1 + .../qemu_2.12.0-virt.aarch64.xml | 1 + tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml | 1 + tests/domaincapsschemadata/qemu_2.12.0.s390x.xml | 1 + tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml | 1 + .../domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml | 1 + tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml | 1 + tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml | 1 + tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml | 1 + tests/domaincapsschemadata/qemu_2.7.0.s390x.xml | 1 + tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml | 1 + tests/domaincapsschemadata/qemu_2.8.0.s390x.xml | 1 + tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml | 1 + tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml | 1 + tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 1 + tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml | 1 + 26 files changed, 37 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index e5d943af50..9041e46622 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -559,16 +559,20 @@ static void virDomainCapsFeatureSEVFormat(virBufferPtr buf, virSEVCapabilityPtr const sev) { - if (!sev) - return; =20 - virBufferAddLit(buf, "\n"); - virBufferAdjustIndent(buf, 2); - virBufferAsprintf(buf, "%d\n", sev->cbitpos); - virBufferAsprintf(buf, "%d\n", + if (!sev) { + virBufferAddLit(buf, "\n"); + } else { + virBufferAddLit(buf, "\n"); + virBufferAdjustIndent(buf, 2); + virBufferAsprintf(buf, "%d\n", sev->cbitpos); + virBufferAsprintf(buf, "%d\= n", sev->reduced_phys_bits); - virBufferAdjustIndent(buf, -2); - virBufferAddLit(buf, "\n"); + virBufferAdjustIndent(buf, -2); + virBufferAddLit(buf, "\n"); + } + + return; } =20 =20 diff --git a/tests/domaincapsschemadata/basic.xml b/tests/domaincapsschemad= ata/basic.xml index acc4a4d7d7..7bf4e56ae0 100644 --- a/tests/domaincapsschemadata/basic.xml +++ b/tests/domaincapsschemadata/basic.xml @@ -20,5 +20,6 @@ + diff --git a/tests/domaincapsschemadata/bhyve_basic.x86_64.xml b/tests/doma= incapsschemadata/bhyve_basic.x86_64.xml index c4e8477055..d6ecf061d0 100644 --- a/tests/domaincapsschemadata/bhyve_basic.x86_64.xml +++ b/tests/domaincapsschemadata/bhyve_basic.x86_64.xml @@ -30,5 +30,6 @@ + diff --git a/tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml b/tests/domai= ncapsschemadata/bhyve_fbuf.x86_64.xml index 0ba46b2c5e..1a5aad7bce 100644 --- a/tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml +++ b/tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml @@ -47,5 +47,6 @@ + diff --git a/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml b/tests/domai= ncapsschemadata/bhyve_uefi.x86_64.xml index 80318c78d8..b624fd0799 100644 --- a/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml +++ b/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml @@ -39,5 +39,6 @@ + diff --git a/tests/domaincapsschemadata/full.xml b/tests/domaincapsschemada= ta/full.xml index 9866886303..d3faf38da0 100644 --- a/tests/domaincapsschemadata/full.xml +++ b/tests/domaincapsschemadata/full.xml @@ -110,5 +110,6 @@ + diff --git a/tests/domaincapsschemadata/libxl-xenfv-usb.xml b/tests/domainc= apsschemadata/libxl-xenfv-usb.xml index 6b56419ee1..29fe1f9aa3 100644 --- a/tests/domaincapsschemadata/libxl-xenfv-usb.xml +++ b/tests/domaincapsschemadata/libxl-xenfv-usb.xml @@ -73,5 +73,6 @@ + diff --git a/tests/domaincapsschemadata/libxl-xenfv.xml b/tests/domaincapss= chemadata/libxl-xenfv.xml index 65dbc5aaf4..5f318d5c4b 100644 --- a/tests/domaincapsschemadata/libxl-xenfv.xml +++ b/tests/domaincapsschemadata/libxl-xenfv.xml @@ -72,5 +72,6 @@ + diff --git a/tests/domaincapsschemadata/libxl-xenpv-usb.xml b/tests/domainc= apsschemadata/libxl-xenpv-usb.xml index 92e54bae07..b9f3ca736b 100644 --- a/tests/domaincapsschemadata/libxl-xenpv-usb.xml +++ b/tests/domaincapsschemadata/libxl-xenpv-usb.xml @@ -63,5 +63,6 @@ + diff --git a/tests/domaincapsschemadata/libxl-xenpv.xml b/tests/domaincapss= chemadata/libxl-xenpv.xml index 741fd2d9d6..6fc65f67b7 100644 --- a/tests/domaincapsschemadata/libxl-xenpv.xml +++ b/tests/domaincapsschemadata/libxl-xenpv.xml @@ -62,5 +62,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml b/tests/domai= ncapsschemadata/qemu_1.7.0.x86_64.xml index 236d0de8f1..3d73133919 100644 --- a/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml @@ -111,5 +111,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml b/test= s/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml index 4d7056162e..56e403c4c7 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml @@ -118,5 +118,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml b/tests/domai= ncapsschemadata/qemu_2.12.0.ppc64.xml index 8d7fd64f65..d0b9c3fdef 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml @@ -80,5 +80,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml b/tests/domai= ncapsschemadata/qemu_2.12.0.s390x.xml index dac3df28da..8742dce530 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml @@ -172,5 +172,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml b/tests/doma= incapsschemadata/qemu_2.12.0.x86_64.xml index a8e3174dd6..7a1be4c093 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml @@ -142,5 +142,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml b/tests= /domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml index 709a14d7fe..b3e85de1d3 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml @@ -115,5 +115,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml b/tests/doma= incapsschemadata/qemu_2.6.0.aarch64.xml index a4789a532c..0fcc715940 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml @@ -111,5 +111,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml b/tests/domain= capsschemadata/qemu_2.6.0.ppc64.xml index 79f4a06769..f2dff05ff8 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml @@ -84,5 +84,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml b/tests/domai= ncapsschemadata/qemu_2.6.0.x86_64.xml index 55edf1b221..c6d9fd8b37 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml @@ -116,5 +116,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml b/tests/domain= capsschemadata/qemu_2.7.0.s390x.xml index d18e05e53c..0c48bd6c75 100644 --- a/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml @@ -77,5 +77,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml b/tests/d= omaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml index 825f1f97f8..1cb843d5d1 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml @@ -117,5 +117,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml b/tests/domain= capsschemadata/qemu_2.8.0.s390x.xml index d524bb8970..7293d89ae7 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml @@ -158,5 +158,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml b/tests/domai= ncapsschemadata/qemu_2.8.0.x86_64.xml index a0d9e11522..8391603a3b 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml @@ -117,5 +117,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml b/tests/d= omaincapsschemadata/qemu_2.9.0-q35.x86_64.xml index 254ee01049..c341de3ce2 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml @@ -125,5 +125,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml b/tests/d= omaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml index 478133693f..4336e65dc8 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml @@ -149,5 +149,6 @@ + diff --git a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml b/tests/domai= ncapsschemadata/qemu_2.9.0.x86_64.xml index 058e624ed3..8e842b89fd 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml @@ -126,5 +126,6 @@ + --=20 2.14.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list