On Fri, May 08, 2020 at 06:48:24PM -0400, Stefan Berger wrote:
On 5/8/20 8:06 AM, Daniel Henrique Barboza wrote:
> Expose the TPM Proxy support for PPC64 guests by creating a new
> cap called QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY.
>
> Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
> ---
> src/qemu/qemu_capabilities.c | 2 ++
> src/qemu/qemu_capabilities.h | 1 +
> tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 +
> tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
> 4 files changed, 5 insertions(+)
>
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 2c6e36685e..dcc1886954 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -580,6 +580,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
> "machine.pseries.cap-sbbc",
> "machine.pseries.cap-ibs",
> "tcg",
> + "spapr-tpm-proxy",
To me a proxy is something different and enablement of a ultracall/hypercall
type of thing. Call it spapr-tpm-hcall?
The "spapr-tpm-proxy" name is already exposed at the qemu level. And
while, I can agree that's maybe not a great name, I think it's
probably even more confusing to add another name fro it at the libvirt level.
> );
> @@ -1301,6 +1302,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
> { "tpm-spapr", QEMU_CAPS_DEVICE_TPM_SPAPR },
> { "vhost-user-fs-device", QEMU_CAPS_DEVICE_VHOST_USER_FS },
> { "tcg-accel", QEMU_CAPS_TCG },
> + { "spapr-tpm-proxy", QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY },
> };
> static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = {
> diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
> index cdeaf09cce..92aca0470b 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -561,6 +561,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for
syntax-check */
> QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC, /* -machine pseries.cap-sbbc */
> QEMU_CAPS_MACHINE_PSERIES_CAP_IBS, /* -machine pseries.cap-ibs */
> QEMU_CAPS_TCG, /* QEMU does support TCG */
> + 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 796ed0a2bc..75301833e6 100644
> --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
> +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
> @@ -184,6 +184,7 @@
> <flag name='machine.pseries.cap-sbbc'/>
> <flag name='machine.pseries.cap-ibs'/>
> <flag name='tcg'/>
> + <flag name='spapr-tpm-proxy'/>
> <version>4001050</version>
> <kvmVersion>0</kvmVersion>
> <microcodeVersion>42900242</microcodeVersion>
> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
> index a5f0bb538b..08cf607cbf 100644
> --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
> +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
> @@ -199,6 +199,7 @@
> <flag name='machine.pseries.cap-sbbc'/>
> <flag name='machine.pseries.cap-ibs'/>
> <flag name='tcg'/>
> + <flag name='spapr-tpm-proxy'/>
> <version>5000000</version>
> <kvmVersion>0</kvmVersion>
> <microcodeVersion>42900241</microcodeVersion>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson