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>
---
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 bface72de2..e1ea95535c 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -487,6 +487,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
/* 300 */
"sdl-gl",
"screendump_device",
+ "tpm-emulator",
);
@@ -2379,6 +2380,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 6f9953478a..6ad8bf6a23 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -471,6 +471,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check
*/
/* 300 */
QEMU_CAPS_SDL_GL, /* -sdl gl */
QEMU_CAPS_SCREENDUMP_DEVICE, /* screendump command accepts device & head */
+ 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 9adca9d46b..a0946e319b 100644
--- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
@@ -122,6 +122,7 @@
<flag name='pr-manager-helper'/>
<flag name='virtual-css-bridge'/>
<flag name='sdl-gl'/>
+ <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 de41d96cd0..54c8a92541 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
@@ -163,6 +163,7 @@
<flag name='memory-backend-file.discard-data'/>
<flag name='sdl-gl'/>
<flag name='screendump_device'/>
+ <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 fc26f934ee..98485e81b0 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
@@ -160,6 +160,7 @@
<flag name='memory-backend-file.discard-data'/>
<flag name='sdl-gl'/>
<flag name='screendump_device'/>
+ <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 bdfb81c998..832a04456b 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
@@ -128,6 +128,7 @@
<flag name='vfio-ccw'/>
<flag name='sdl-gl'/>
<flag name='screendump_device'/>
+ <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 820b3ef759..6ff0485af8 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -201,6 +201,7 @@
<flag name='memory-backend-file.discard-data'/>
<flag name='sdl-gl'/>
<flag name='screendump_device'/>
+ <flag name='tpm-emulator'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>390813</microcodeVersion>
--
2.14.3