From nobody Thu Mar 28 19:42:43 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 1528804854901811.8002193569504; Tue, 12 Jun 2018 05:00:54 -0700 (PDT) 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 866B5C058CAB; Tue, 12 Jun 2018 12:00: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 0AE3D182DF; Tue, 12 Jun 2018 12:00:52 +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 9C641EF00; Tue, 12 Jun 2018 12:00:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5CC0Ubo031401 for ; Tue, 12 Jun 2018 08:00:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0287A111C4A2; Tue, 12 Jun 2018 12:00:30 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D591111C4A0; Tue, 12 Jun 2018 12:00:29 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 12 Jun 2018 14:00:15 +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.3 X-loop: libvir-list@redhat.com Cc: brijesh.singh@amd.com Subject: [libvirt] [PATCH 01/10] domaincaps: rename reduced-phys-bits to reducedPhysBits 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.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.32]); Tue, 12 Jun 2018 12:00:54 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 We have enough elements using underscores instead of camelCase, do not bring dashes into the mix. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Brijesh Singh Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Brijesh Singh --- docs/formatdomaincaps.html.in | 2 +- docs/schemas/domaincaps.rng | 2 +- src/conf/domain_capabilities.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in index 6be553a114..9920de4dac 100644 --- a/docs/formatdomaincaps.html.in +++ b/docs/formatdomaincaps.html.in @@ -492,7 +492,7 @@
When memory encryption is enabled, one of the physical address b= its (aka the C-bit) is utilized to mark if a memory page is protected. T= he C-bit position is Hypervisor dependent.
-
reduced-phys-bits
+
reducedPhysBits
When memory encryption is enabled, we lose certain bits in physi= cal address space. The number of bits we lose is hypervisor dependent. diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng index 1d0a2e17aa..e25201fc68 100644 --- a/docs/schemas/domaincaps.rng +++ b/docs/schemas/domaincaps.rng @@ -216,7 +216,7 @@ - + diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index ec469bfb9a..e5d943af50 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -565,7 +565,7 @@ virDomainCapsFeatureSEVFormat(virBufferPtr buf, virBufferAddLit(buf, "\n"); virBufferAdjustIndent(buf, 2); virBufferAsprintf(buf, "%d\n", sev->cbitpos); - virBufferAsprintf(buf, "%d\n", + virBufferAsprintf(buf, "%d\n", sev->reduced_phys_bits); virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 19:42:43 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 152880483605285.97825441104942; Tue, 12 Jun 2018 05:00:36 -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 C030519CBC7; Tue, 12 Jun 2018 12:00:33 +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 6D0D0958A2; Tue, 12 Jun 2018 12:00:33 +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 6B6F7EEF4; Tue, 12 Jun 2018 12:00:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5CC0UX8031406 for ; Tue, 12 Jun 2018 08:00:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id BCE6410FD29B; Tue, 12 Jun 2018 12:00:30 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4295710FD29A; Tue, 12 Jun 2018 12:00:30 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 12 Jun 2018 14:00:16 +0200 Message-Id: <372a07ef243c376bec86adbc82e2f53f6f049e8e.1528804609.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: brijesh.singh@amd.com Subject: [libvirt] [PATCH 02/10] conf: prefer camelCase for launchSecurity 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.29]); Tue, 12 Jun 2018 12:00:34 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Adjust the documentation, parser and tests to change: launch-security -> launchSecurity reduced-phys-bits -> reducedPhysBits dh-cert -> dhCert Also fix the headline in formatdomain.html to be more generic, and some leftover closing elements in the documentation. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Brijesh Singh Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Brijesh Singh --- docs/formatdomain.html.in | 22 ++++++++++--------= -- docs/schemas/domaincommon.rng | 10 ++++----- src/conf/domain_conf.c | 24 +++++++++++-------= ---- tests/genericxml2xmlindata/launch-security-sev.xml | 8 ++++---- tests/qemuxml2argvdata/launch-security-sev.xml | 8 ++++---- 5 files changed, 36 insertions(+), 36 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 77845fe5f7..7e710d7c4a 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -8458,12 +8458,12 @@ qemu-kvm -net nic,model=3D? /dev/null =20

Note: DEA/TDEA is synonymous with DES/TDES.

=20 -

Secure Encrypted Virtualization (SEV)

+

Launch Security

=20

- The contents of the <launch-security type=3D'sev'> element + The contents of the <launchSecurity type=3D'sev'> element is used to provide the guest owners input used for creating an encr= ypted - VM using the AMD SEV feature. + VM using the AMD SEV feature (Secure Encrypted Virtualization). =20 SEV is an extension to the AMD-V architecture which supports running encrypted virtual machine (VMs) under the control of KVM. Encrypted @@ -8480,13 +8480,13 @@ qemu-kvm -net nic,model=3D? /dev/null

 <domain>
   ...
-  <launch-security type=3D'sev'>
+  <launchSecurity type=3D'sev'>
     <policy> 0x0001 </policy>
     <cbitpos> 47 </cbitpos>
-    <reduced-phys-bits> 1 </reduced-phys-bits>
+    <reducedPhysBits> 1 </reducedPhysBits>
+    <dhCert> RBBBSDDD=3DFDDCCCDDDG </dhCert>
     <session> AAACCCDD=3DFFFCCCDSDS </session>
-    <dh-cert> RBBBSDDD=3DFDDCCCDDDG </dh>
-  </sev>
+  </launchSecurity>
   ...
 </domain>
 
@@ -8498,8 +8498,8 @@ qemu-kvm -net nic,model=3D? /dev/null hypervisor dependent and can be obtained through the sev element from the domain capabilities.
-
reduced-phys-bits
-
The required reduced-phys-bits element provides the= physical +
reducedPhysBits
+
The required reducedPhysBits element provides the p= hysical address bit reducation. Similar to cbitpos the value of= reduced-phys-bit is hypervisor dependent and can be obtained through the sev element from the domain capabilities. @@ -8558,8 +8558,8 @@ qemu-kvm -net nic,model=3D? /dev/null =20
-
dh-cert
-
The optional dh-cert element provides the guest own= ers +
dhCert
+
The optional dhCert element provides the guest owne= rs base64 encoded Diffie-Hellman (DH) key. The key is used to negotiate= a master secret key between the SEV firmware and guest owner. This mas= ter secret key is then used to establish a trusted channel between SEV diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 1d06a5ea89..4a454dddb4 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -78,7 +78,7 @@ - + @@ -439,8 +439,8 @@ =20 - - + + sev @@ -448,7 +448,7 @@ - + @@ -460,7 +460,7 @@ - + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 85f07af46e..ac5484d070 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15862,7 +15862,7 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, =20 if (!(type =3D virXMLPropString(sevNode, "type"))) { virReportError(VIR_ERR_XML_ERROR, "%s", - _("missing launch-security type")); + _("missing launch security type")); goto error; } =20 @@ -15874,33 +15874,33 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode, case VIR_DOMAIN_LAUNCH_SECURITY_LAST: default: virReportError(VIR_ERR_XML_ERROR, - _("unsupported launch-security type '%s'"), + _("unsupported launch security type '%s'"), type); goto error; } =20 if (virXPathUInt("string(./cbitpos)", ctxt, &def->cbitpos) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", - _("failed to get launch-security cbitpos")); + _("failed to get launch security cbitpos")); goto error; } =20 - if (virXPathUInt("string(./reduced-phys-bits)", ctxt, + if (virXPathUInt("string(./reducedPhysBits)", ctxt, &def->reduced_phys_bits) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", - _("failed to get launch-security reduced-phys-bits"= )); + _("failed to get launch security reduced-phys-bits"= )); goto error; } =20 if (virXPathULongHex("string(./policy)", ctxt, &policy) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", - _("failed to get launch-security policy")); + _("failed to get launch security policy")); goto error; } =20 def->policy =3D policy; =20 - if ((tmp =3D virXPathString("string(./dh-cert)", ctxt))) { + if ((tmp =3D virXPathString("string(./dhCert)", ctxt))) { if (VIR_STRDUP(def->dh_cert, tmp) < 0) goto error; =20 @@ -20730,7 +20730,7 @@ virDomainDefParseXML(xmlDocPtr xml, VIR_FREE(nodes); =20 /* Check for SEV feature */ - if ((node =3D virXPathNode("./launch-security", ctxt)) !=3D NULL) { + if ((node =3D virXPathNode("./launchSecurity", ctxt)) !=3D NULL) { def->sev =3D virDomainSEVDefParseXML(node, ctxt); if (!def->sev) goto error; @@ -26771,22 +26771,22 @@ virDomainSEVDefFormat(virBufferPtr buf, virDomain= SevDefPtr sev) if (!sev) return; =20 - virBufferAsprintf(buf, "\n", + virBufferAsprintf(buf, "\n", virDomainLaunchSecurityTypeToString(sev->sectype)); virBufferAdjustIndent(buf, 2); =20 virBufferAsprintf(buf, "%d\n", sev->cbitpos); - virBufferAsprintf(buf, "%d\n", + virBufferAsprintf(buf, "%d\n", sev->reduced_phys_bits); virBufferAsprintf(buf, "0x%04x\n", sev->policy); if (sev->dh_cert) - virBufferEscapeString(buf, "%s\n", sev->dh_cert= ); + virBufferEscapeString(buf, "%s\n", sev->dh_cert); =20 if (sev->session) virBufferEscapeString(buf, "%s\n", sev->session= ); =20 virBufferAdjustIndent(buf, -2); - virBufferAddLit(buf, "\n"); + virBufferAddLit(buf, "\n"); } =20 =20 diff --git a/tests/genericxml2xmlindata/launch-security-sev.xml b/tests/gen= ericxml2xmlindata/launch-security-sev.xml index fb64e1e4be..c25cfbbf14 100644 --- a/tests/genericxml2xmlindata/launch-security-sev.xml +++ b/tests/genericxml2xmlindata/launch-security-sev.xml @@ -14,11 +14,11 @@ destroy - + 47 - 1 + 1 0x0001 - AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA + AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA IHAVENOIDEABUTJUSTPROVIDINGASTRING - + diff --git a/tests/qemuxml2argvdata/launch-security-sev.xml b/tests/qemuxml= 2argvdata/launch-security-sev.xml index 5ae83f61c1..b73defd6ee 100644 --- a/tests/qemuxml2argvdata/launch-security-sev.xml +++ b/tests/qemuxml2argvdata/launch-security-sev.xml @@ -27,11 +27,11 @@ - + 47 - 1 + 1 0x0001 - AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA + AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA IHAVENOIDEABUTJUSTPROVIDINGASTRING - + --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 19:42:43 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 1528804851032345.5436472994853; Tue, 12 Jun 2018 05:00:51 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 009B730015D6; Tue, 12 Jun 2018 12:00:49 +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 57B20308BDC8; Tue, 12 Jun 2018 12:00: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 3A46D180053D; Tue, 12 Jun 2018 12:00:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5CC0V1W031416 for ; Tue, 12 Jun 2018 08:00:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7CB3A10FD29B; Tue, 12 Jun 2018 12:00:31 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03A0B10FD29A; Tue, 12 Jun 2018 12:00:30 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 12 Jun 2018 14:00:17 +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.3 X-loop: libvir-list@redhat.com Cc: brijesh.singh@amd.com Subject: [libvirt] [PATCH 03/10] qemu: fail if virQEMUCapsProbeQMPSEVCapabilities fails 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.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 12 Jun 2018 12:00:50 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Do not mask the errors. If we'd expect query-sev-capabilities to fail, we should not call it in the first place. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Brijesh Singh Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Brijesh Singh --- src/qemu/qemu_capabilities.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7a245a58bc..35d46c465d 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4105,7 +4105,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, /* Probe for SEV capabilities */ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SEV_GUEST)) { if (virQEMUCapsProbeQMPSEVCapabilities(qemuCaps, mon) < 0) - virQEMUCapsClear(qemuCaps, QEMU_CAPS_SEV_GUEST); + goto cleanup; } =20 ret =3D 0; --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 19:42:43 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 1528804850411920.0007554782391; Tue, 12 Jun 2018 05:00:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 40429C04BD59; Tue, 12 Jun 2018 12:00:48 +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 C75CD834C7; Tue, 12 Jun 2018 12:00:47 +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 46B524A479; Tue, 12 Jun 2018 12:00:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5CC0W6E031421 for ; Tue, 12 Jun 2018 08:00:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3CE5E10FD29A; Tue, 12 Jun 2018 12:00:32 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B795410FD29F; Tue, 12 Jun 2018 12:00:31 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 12 Jun 2018 14:00:18 +0200 Message-Id: <27d930fc600ffdb2bf75fc462e99cfc190b616a0.1528804609.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: brijesh.singh@amd.com Subject: [libvirt] [PATCH 04/10] remove virQEMUCapsSetSEVCapabilities 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.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 12 Jun 2018 12:00:49 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 It is only used in one place. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Brijesh Singh Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Brijesh Singh --- src/qemu/qemu_capabilities.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 35d46c465d..7131c2a8ee 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2084,16 +2084,6 @@ virQEMUCapsSetGICCapabilities(virQEMUCapsPtr qemuCap= s, } =20 =20 -void -virQEMUCapsSetSEVCapabilities(virQEMUCapsPtr qemuCaps, - virSEVCapability *capabilities) -{ - virSEVCapabilitiesFree(qemuCaps->sevCapabilities); - - qemuCaps->sevCapabilities =3D capabilities; -} - - virSEVCapabilityPtr virQEMUCapsGetSEVCapabilities(virQEMUCapsPtr qemuCaps) { @@ -2697,8 +2687,8 @@ virQEMUCapsProbeQMPSEVCapabilities(virQEMUCapsPtr qem= uCaps, if (qemuMonitorGetSEVCapabilities(mon, &caps) < 0) return -1; =20 - virQEMUCapsSetSEVCapabilities(qemuCaps, caps); - + virSEVCapabilitiesFree(qemuCaps->sevCapabilities); + qemuCaps->sevCapabilities =3D caps; return 0; } =20 --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 19:42:43 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 1528804853548666.9877330197409; Tue, 12 Jun 2018 05:00:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB0AB356FE; Tue, 12 Jun 2018 12:00:51 +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 D46A2308BDCA; Tue, 12 Jun 2018 12:00:50 +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 6A2874A46E; Tue, 12 Jun 2018 12:00:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5CC0XEP031429 for ; Tue, 12 Jun 2018 08:00:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id F3B1E10FD29A; Tue, 12 Jun 2018 12:00:32 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 79B6810FD29B; Tue, 12 Jun 2018 12:00:32 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 12 Jun 2018 14:00:19 +0200 Message-Id: <97d259e2dce5de43032d674093b88944b51d409b.1528804609.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: brijesh.singh@amd.com Subject: [libvirt] [PATCH 05/10] qemuDomainGetSEVMeasurement: fix possible leak 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.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 12 Jun 2018 12:00:53 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Free tmp even on failure. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Brijesh Singh Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Brijesh Singh --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f0fb806fcd..ac2ef35f70 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -21532,10 +21532,10 @@ qemuDomainGetSEVMeasurement(virQEMUDriverPtr driv= er, tmp) < 0) goto endjob; =20 - VIR_FREE(tmp); ret =3D 0; =20 endjob: + VIR_FREE(tmp); qemuDomainObjEndJob(driver, vm); return ret; } --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 19:42:43 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 1528804857293582.3548276661415; Tue, 12 Jun 2018 05:00:57 -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 3973823E6D0; Tue, 12 Jun 2018 12:00:55 +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 CDCAF3001A7E; Tue, 12 Jun 2018 12:00:54 +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 61BF44BB78; Tue, 12 Jun 2018 12:00:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5CC0Xb1031439 for ; Tue, 12 Jun 2018 08:00:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id B4D1910FD29A; Tue, 12 Jun 2018 12:00:33 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A75010FD29B; Tue, 12 Jun 2018 12:00:33 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 12 Jun 2018 14:00:20 +0200 Message-Id: <8b218e4c1b6408f1701383291c382b443858676b.1528804609.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: brijesh.singh@amd.com Subject: [libvirt] [PATCH 06/10] rename qemuBuildSevCreateFile to qemuProcessSEVCreateFile 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.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 12 Jun 2018 12:00:56 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Make the function prefix match the file it's in. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Brijesh Singh Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Brijesh Singh --- src/qemu/qemu_process.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 480bc8c1ad..5d4b6a9499 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5826,9 +5826,9 @@ qemuProcessPrepareDomain(virQEMUDriverPtr driver, =20 =20 static int -qemuBuildSevCreateFile(const char *configDir, - const char *name, - const char *data) +qemuProcessSEVCreateFile(const char *configDir, + const char *name, + const char *data) { char *configFile; =20 @@ -5871,12 +5871,12 @@ qemuProcessPrepareSevGuestInput(virDomainObjPtr vm) } =20 if (sev->dh_cert) { - if (qemuBuildSevCreateFile(priv->libDir, "dh_cert", sev->dh_cert) = < 0) + if (qemuProcessSEVCreateFile(priv->libDir, "dh_cert", sev->dh_cert= ) < 0) return -1; } =20 if (sev->session) { - if (qemuBuildSevCreateFile(priv->libDir, "session", sev->session) = < 0) + if (qemuProcessSEVCreateFile(priv->libDir, "session", sev->session= ) < 0) return -1; } =20 --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 19:42:43 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 1528804863624334.24908765890495; Tue, 12 Jun 2018 05:01:03 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 17D793084039; Tue, 12 Jun 2018 12:01:02 +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 98FCD308BDAE; Tue, 12 Jun 2018 12:01:01 +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 DABBD4A46F; Tue, 12 Jun 2018 12:01:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5CC0YtH031447 for ; Tue, 12 Jun 2018 08:00:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 75FB810FD29A; Tue, 12 Jun 2018 12:00:34 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id EFAEB10FD29B; Tue, 12 Jun 2018 12:00:33 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 12 Jun 2018 14:00:21 +0200 Message-Id: <9556317d41cdd977b33f73cd37c8b87d91d43950.1528804609.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: brijesh.singh@amd.com Subject: [libvirt] [PATCH 07/10] qemuProcessSEVCreateFile: use a cleanup label 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.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 12 Jun 2018 12:01:03 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 A common cleanup path for both the success and the error case. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Brijesh Singh Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Brijesh Singh --- src/qemu/qemu_process.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 5d4b6a9499..7468e14447 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5831,6 +5831,7 @@ qemuProcessSEVCreateFile(const char *configDir, const char *data) { char *configFile; + int ret =3D -1; =20 if (!(configFile =3D virFileBuildPath(configDir, name, ".base64"))) return -1; @@ -5838,15 +5839,12 @@ qemuProcessSEVCreateFile(const char *configDir, if (virFileRewriteStr(configFile, S_IRUSR | S_IWUSR, data) < 0) { virReportSystemError(errno, _("failed to write data to config '%s'= "), configFile); - goto error; + goto cleanup; } =20 + cleanup: VIR_FREE(configFile); - return 0; - - error: - VIR_FREE(configFile); - return -1; + return ret; } =20 =20 --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 19:42:43 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 1528804870860436.86127572727275; Tue, 12 Jun 2018 05:01:10 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 83B33307CF25; Tue, 12 Jun 2018 12:01:09 +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 4F57116D28; Tue, 12 Jun 2018 12:01:09 +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 D3025180BACA; Tue, 12 Jun 2018 12:01:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5CC0ZFP031455 for ; Tue, 12 Jun 2018 08:00:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id 376C110FD29A; Tue, 12 Jun 2018 12:00:35 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B1CEE10FD29F; Tue, 12 Jun 2018 12:00:34 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 12 Jun 2018 14:00:22 +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.3 X-loop: libvir-list@redhat.com Cc: brijesh.singh@amd.com Subject: [libvirt] [PATCH 08/10] Rename virDomainSevDefPtr to virDomainSEVDefPtr 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.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 12 Jun 2018 12:01:10 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Some identifiers use Sev, some SEV. Prefer the latter. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Brijesh Singh Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Brijesh Singh --- src/conf/domain_conf.c | 8 ++++---- src/conf/domain_conf.h | 8 ++++---- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_process.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ac5484d070..5c3b20fb21 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2962,7 +2962,7 @@ virDomainCachetuneDefFree(virDomainCachetuneDefPtr ca= chetune) =20 =20 static void -virDomainSEVDefFree(virDomainSevDefPtr def) +virDomainSEVDefFree(virDomainSEVDefPtr def) { if (!def) return; @@ -15845,14 +15845,14 @@ virDomainMemoryTargetDefParseXML(xmlNodePtr node, } =20 =20 -static virDomainSevDefPtr +static virDomainSEVDefPtr virDomainSEVDefParseXML(xmlNodePtr sevNode, xmlXPathContextPtr ctxt) { char *tmp =3D NULL; char *type =3D NULL; xmlNodePtr save =3D ctxt->node; - virDomainSevDefPtr def; + virDomainSEVDefPtr def; unsigned long policy; =20 ctxt->node =3D sevNode; @@ -26766,7 +26766,7 @@ virDomainKeyWrapDefFormat(virBufferPtr buf, virDoma= inKeyWrapDefPtr keywrap) =20 =20 static void -virDomainSEVDefFormat(virBufferPtr buf, virDomainSevDefPtr sev) +virDomainSEVDefFormat(virBufferPtr buf, virDomainSEVDefPtr sev) { if (!sev) return; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index ea8ddb2b39..6344c02d1c 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2324,10 +2324,10 @@ typedef enum { VIR_DOMAIN_LAUNCH_SECURITY_LAST, } virDomainLaunchSecurity; =20 -typedef struct _virDomainSevDef virDomainSevDef; -typedef virDomainSevDef *virDomainSevDefPtr; +typedef struct _virDomainSEVDef virDomainSEVDef; +typedef virDomainSEVDef *virDomainSEVDefPtr; =20 -struct _virDomainSevDef { +struct _virDomainSEVDef { int sectype; /* enum virDomainLaunchSecurity */ char *dh_cert; char *session; @@ -2529,7 +2529,7 @@ struct _virDomainDef { virDomainKeyWrapDefPtr keywrap; =20 /* SEV-specific domain */ - virDomainSevDefPtr sev; + virDomainSEVDefPtr sev; =20 /* Application-specific custom metadata */ xmlNodePtr metadata; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6a95344fd5..1cb721c152 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9692,7 +9692,7 @@ qemuBuildTPMCommandLine(virCommandPtr cmd, =20 static int qemuBuildSevCommandLine(virDomainObjPtr vm, virCommandPtr cmd, - virDomainSevDefPtr sev) + virDomainSEVDefPtr sev) { virBuffer obj =3D VIR_BUFFER_INITIALIZER; qemuDomainObjPrivatePtr priv =3D vm->privateData; diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7468e14447..36ca365a72 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5854,7 +5854,7 @@ qemuProcessPrepareSevGuestInput(virDomainObjPtr vm) qemuDomainObjPrivatePtr priv =3D vm->privateData; virDomainDefPtr def =3D vm->def; virQEMUCapsPtr qemuCaps =3D priv->qemuCaps; - virDomainSevDefPtr sev =3D def->sev; + virDomainSEVDefPtr sev =3D def->sev; =20 if (!sev) return 0; --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 19:42:43 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 1528804878524102.74651341688411; Tue, 12 Jun 2018 05:01:18 -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 6ED333680B; Tue, 12 Jun 2018 12:01:17 +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 2377510694CD; Tue, 12 Jun 2018 12:01:17 +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 B0AD14A469; Tue, 12 Jun 2018 12:01:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5CC0aLT031465 for ; Tue, 12 Jun 2018 08:00:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id EB86F10FD29A; Tue, 12 Jun 2018 12:00:35 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 71AD610FD29B; Tue, 12 Jun 2018 12:00:35 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 12 Jun 2018 14:00:23 +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.3 X-loop: libvir-list@redhat.com Cc: brijesh.singh@amd.com Subject: [libvirt] [PATCH 09/10] rename more Sev functions to SEV 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.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 12 Jun 2018 12:01:18 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: J=C3=A1n Tomko Reviewed-by: Brijesh Singh Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Brijesh Singh --- src/qemu/qemu_command.c | 4 ++-- src/qemu/qemu_process.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1cb721c152..a557a0387a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9691,7 +9691,7 @@ qemuBuildTPMCommandLine(virCommandPtr cmd, } =20 static int -qemuBuildSevCommandLine(virDomainObjPtr vm, virCommandPtr cmd, +qemuBuildSEVCommandLine(virDomainObjPtr vm, virCommandPtr cmd, virDomainSEVDefPtr sev) { virBuffer obj =3D VIR_BUFFER_INITIALIZER; @@ -10321,7 +10321,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, if (qemuBuildVMCoreInfoCommandLine(cmd, def, qemuCaps) < 0) goto error; =20 - if (qemuBuildSevCommandLine(vm, cmd, def->sev) < 0) + if (qemuBuildSEVCommandLine(vm, cmd, def->sev) < 0) goto error; =20 if (snapshot) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 36ca365a72..f62433c278 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5849,7 +5849,7 @@ qemuProcessSEVCreateFile(const char *configDir, =20 =20 static int -qemuProcessPrepareSevGuestInput(virDomainObjPtr vm) +qemuProcessPrepareSEVGuestInput(virDomainObjPtr vm) { qemuDomainObjPrivatePtr priv =3D vm->privateData; virDomainDefPtr def =3D vm->def; @@ -6044,7 +6044,7 @@ qemuProcessPrepareHost(virQEMUDriverPtr driver, if (qemuExtDevicesPrepareHost(driver, vm->def) < 0) goto cleanup; =20 - if (qemuProcessPrepareSevGuestInput(vm) < 0) + if (qemuProcessPrepareSEVGuestInput(vm) < 0) goto cleanup; =20 ret =3D 0; --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Mar 28 19:42:43 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 15288048601281013.8583046955998; Tue, 12 Jun 2018 05:01:00 -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 0E5C7461CD; Tue, 12 Jun 2018 12:00:58 +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 B3AA091772; Tue, 12 Jun 2018 12:00:57 +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 4F59C4A46F; Tue, 12 Jun 2018 12:00:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5CC0ahE031475 for ; Tue, 12 Jun 2018 08:00:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id ABBDB10FD29C; Tue, 12 Jun 2018 12:00:36 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 31D4C10FD29B; Tue, 12 Jun 2018 12:00:36 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 12 Jun 2018 14:00:24 +0200 Message-Id: <06f3d2d96944f2d1d836666a430152dd6c86630f.1528804609.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: brijesh.singh@amd.com Subject: [libvirt] [PATCH 10/10] qemuMonitorJSONGetSEVCapabilities: remove redundant whitespace 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.29]); Tue, 12 Jun 2018 12:00:59 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: J=C3=A1n Tomko Reviewed-by: Brijesh Singh Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Brijesh Singh --- src/qemu/qemu_monitor_json.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index c5480a2d0e..3ad01b9dd3 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -6423,7 +6423,6 @@ qemuMonitorJSONGetSEVCapabilities(qemuMonitorPtr mon, if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) goto cleanup; =20 - if (qemuMonitorJSONCheckError(cmd, reply) < 0) goto cleanup; =20 --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list