Extend the QEMU capabilities with tpm-emulator support.
Signed-off-by: Stefan Berger <stefanb(a)linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan(a)redhat.com>
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 5 +++++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
7 files changed, 11 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index b8764eacd8..9c1d79b3a7 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -493,6 +493,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
/* 305 */
"vhost-vsock",
+ "tpm-emulator",
);
@@ -2448,6 +2449,10 @@ static const struct tpmTypeToCaps virQEMUCapsTPMTypesToCaps[] = {
.type = VIR_DOMAIN_TPM_TYPE_PASSTHROUGH,
.caps = QEMU_CAPS_DEVICE_TPM_PASSTHROUGH,
},
+ {
+ .type = VIR_DOMAIN_TPM_TYPE_EMULATOR,
+ .caps = QEMU_CAPS_DEVICE_TPM_EMULATOR,
+ },
};
const struct tpmTypeToCaps virQEMUCapsTPMModelsToCaps[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index f2aecefb9b..6a0da5e18f 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -477,6 +477,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check
*/
/* 305 */
QEMU_CAPS_DEVICE_VHOST_VSOCK, /* -device vhost-vsock-* */
+ QEMU_CAPS_DEVICE_TPM_EMULATOR, /* -tpmdev emulator */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
index 7106147417..cebad6841c 100644
--- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
@@ -125,6 +125,7 @@
<flag name='sdl-gl'/>
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
+ <flag name='tpm-emulator'/>
<version>2011000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>342166</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
index f511bcb58c..b12efa7c94 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
@@ -167,6 +167,7 @@
<flag name='hda-output'/>
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
+ <flag name='tpm-emulator'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>343099</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
index 37813ad0b1..be1c8ac4ff 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
@@ -164,6 +164,7 @@
<flag name='hda-output'/>
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
+ <flag name='tpm-emulator'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>419968</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
index 3191e9ba95..90e61a1089 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
@@ -131,6 +131,7 @@
<flag name='screendump_device'/>
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
+ <flag name='tpm-emulator'/>
<version>2012000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>371055</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
index 964b9e8fa6..cf1d974ca4 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -206,6 +206,7 @@
<flag name='blockdev-del'/>
<flag name='vmgenid'/>
<flag name='vhost-vsock'/>
+ <flag name='tpm-emulator'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>390813</microcodeVersion>
--
2.14.3