From: Daniel Henrique Barboza Date: Wed, 10 Jun 2020 18:11:44 +0000 (-0300) Subject: qemu: Extend QEMU capabilities with 'spapr-tpm-proxy' X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=096a42000e6c4e13015a04e8b2a1049de5d2cfdc;p=libvirt.git 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 Reviewed-by: Stefan Berger Reviewed-by: Ján Tomko Signed-off-by: Daniel Henrique Barboza Signed-off-by: Ján Tomko --- diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 33ba6cdd42..267cbcf883 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -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 }, }; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 5f1ac2dba9..0bf46d493e 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -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; diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml index 70c826e0cf..60aef01f7b 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -189,6 +189,7 @@ + 4001050 0 42900242 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml index b3f673b0f6..f5d6e0679e 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -205,6 +205,7 @@ + 5000000 0 42900241