]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Extend QEMU capabilities with 'spapr-tpm-proxy'
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Wed, 10 Jun 2020 18:11:44 +0000 (15:11 -0300)
committerJán Tomko <jtomko@redhat.com>
Tue, 23 Jun 2020 15:27:50 +0000 (17:27 +0200)
Expose the TPM Proxy support for PPC64 guests by creating a new
cap called QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY.

This device is part of the machinery the guest need to orchestrate
with the PPC64 Ultravisor the transition to the Secure VM (SVM)
mode. Inside QEMU, this device will be used with the H_TPM_COMM
hypercall to connect with the TPM Resource Manager, enabling
the guest to open and close TPM sessions with the host TPM.

Tested-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml

index 33ba6cdd42dde133ade315af9166c4503acc0a43..267cbcf883d99631ecfd5b04824eca340cae083a 100644 (file)
@@ -594,6 +594,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
               /* 375 */
               "migration-param.xbzrle-cache-size",
               "intel-iommu.aw-bits",
+              "spapr-tpm-proxy",
     );
 
 
@@ -1319,6 +1320,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
     { "vhost-user-fs-device", QEMU_CAPS_DEVICE_VHOST_USER_FS },
     { "tcg-accel", QEMU_CAPS_TCG },
     { "pvscsi", QEMU_CAPS_SCSI_PVSCSI },
+    { "spapr-tpm-proxy", QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY },
 };
 
 
index 5f1ac2dba956518f67c645e40513152ad302cc5a..0bf46d493ecb715af6896ae5136dee553673652c 100644 (file)
@@ -574,6 +574,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
     /* 375 */
     QEMU_CAPS_MIGRATION_PARAM_XBZRLE_CACHE_SIZE, /* xbzrle-cache-size field in migrate-set-parameters */
     QEMU_CAPS_INTEL_IOMMU_AW_BITS, /* intel-iommu.aw-bits */
+    QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY, /* -device spapr-tpm-proxy */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
index 70c826e0cf5ab91c7a8fab8983683feb50069cce..60aef01f7b0ceaf93b171369caa1dcd71f8a8baa 100644 (file)
   <flag name='migration-param.bandwidth'/>
   <flag name='migration-param.downtime'/>
   <flag name='migration-param.xbzrle-cache-size'/>
+  <flag name='spapr-tpm-proxy'/>
   <version>4001050</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>42900242</microcodeVersion>
index b3f673b0f6ce09f50c6f80ccef587b826efb009e..f5d6e0679eb6c6dc0c2721f84245af49569b0657 100644 (file)
   <flag name='migration-param.bandwidth'/>
   <flag name='migration-param.downtime'/>
   <flag name='migration-param.xbzrle-cache-size'/>
+  <flag name='spapr-tpm-proxy'/>
   <version>5000000</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>42900241</microcodeVersion>