[PATCH v2 3/6] qemu: Extend QEMU capabilities with 'tpm-spapr'

Stefan Berger posted 6 patches 16 weeks ago

[PATCH v2 3/6] qemu: Extend QEMU capabilities with 'tpm-spapr'

Posted by Stefan Berger 16 weeks ago
Extend the QEMU capabilties with tpm-spapr support.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 src/qemu/qemu_capabilities.c | 6 ++++++
 src/qemu/qemu_capabilities.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 8b7fde2bcc..02ca023f27 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -559,6 +559,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
               "i8042",
               "rng-builtin",
               "virtio-net.failover",
+              "tpm-spapr",
     );
 
 
@@ -1275,6 +1276,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
     { "max-arm-cpu", QEMU_CAPS_ARM_MAX_CPU },
     { "i8042", QEMU_CAPS_DEVICE_I8042 },
     { "rng-builtin", QEMU_CAPS_OBJECT_RNG_BUILTIN },
+    { "tpm-spapr", QEMU_CAPS_DEVICE_TPM_SPAPR },
 };
 
 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = {
@@ -3028,6 +3030,10 @@ const struct tpmTypeToCaps virQEMUCapsTPMModelsToCaps[] = {
         .type = VIR_DOMAIN_TPM_MODEL_CRB,
         .caps = QEMU_CAPS_DEVICE_TPM_CRB,
     },
+    {
+        .type = VIR_DOMAIN_TPM_MODEL_SPAPR,
+        .caps = QEMU_CAPS_DEVICE_TPM_SPAPR,
+    },
 };
 
 static int
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index d86f54a481..b97c11ee1d 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -540,6 +540,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
     QEMU_CAPS_DEVICE_I8042, /* PS/2 controller */
     QEMU_CAPS_OBJECT_RNG_BUILTIN, /* -object rng-builtin */
     QEMU_CAPS_VIRTIO_NET_FAILOVER, /* virtio-net-*.failover */
+    QEMU_CAPS_DEVICE_TPM_SPAPR, /* -device tpm-spapr */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
-- 
2.17.1


Re: [PATCH v2 3/6] qemu: Extend QEMU capabilities with 'tpm-spapr'

Posted by Ján Tomko 16 weeks ago
On Mon, Feb 03, 2020 at 10:59:18AM -0500, Stefan Berger wrote:
>Extend the QEMU capabilties with tpm-spapr support.
>
>Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>---
> src/qemu/qemu_capabilities.c | 6 ++++++
> src/qemu/qemu_capabilities.h | 1 +
> 2 files changed, 7 insertions(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano