qemu: Extend QEMU capabilities with 'spapr-tpm-proxy'

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>
This commit is contained in:
Daniel Henrique Barboza 2020-06-10 15:11:44 -03:00 committed by Ján Tomko
parent f1d7d6c2cf
commit 096a42000e
4 changed files with 5 additions and 0 deletions

View 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 },
};

View 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;

View File

@ -189,6 +189,7 @@
<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>

View File

@ -205,6 +205,7 @@
<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>