diff options
author | Stefan Berger <stefanb@linux.ibm.com> | 2021-08-02 17:52:38 -0400 |
---|---|---|
committer | Stefan Berger <stefanb@linux.ibm.com> | 2021-08-31 17:33:11 -0400 |
commit | 09b20a148afeebe2084c92672d3acaa26a371296 (patch) | |
tree | 537307e3133dc01e8c12ac5612c2e03d49a52c35 /tests/qtest/tpm-emu.h | |
parent | 9bd0e32a194826facff4e12d2cc8ba027dc107cb (diff) | |
download | qemu-09b20a148afeebe2084c92672d3acaa26a371296.zip qemu-09b20a148afeebe2084c92672d3acaa26a371296.tar.gz qemu-09b20a148afeebe2084c92672d3acaa26a371296.tar.bz2 |
tests: Add tpm_version field to TPMTestState and fill it
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-id: 20210802215246.1433175-3-stefanb@linux.ibm.com
Diffstat (limited to 'tests/qtest/tpm-emu.h')
-rw-r--r-- | tests/qtest/tpm-emu.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/qtest/tpm-emu.h b/tests/qtest/tpm-emu.h index b066ad6..6105198 100644 --- a/tests/qtest/tpm-emu.h +++ b/tests/qtest/tpm-emu.h @@ -18,6 +18,7 @@ #include "qemu/sockets.h" #include "io/channel.h" +#include "sysemu/tpm.h" struct tpm_hdr { uint16_t tag; @@ -26,6 +27,12 @@ struct tpm_hdr { char buffer[]; } QEMU_PACKED; +#ifndef CONFIG_TPM +enum TPMVersion { + TPM_VERSION_2_0 = 2, +}; +#endif + typedef struct TPMTestState { GMutex data_mutex; GCond data_cond; @@ -34,6 +41,7 @@ typedef struct TPMTestState { QIOChannel *tpm_ioc; GThread *emu_tpm_thread; struct tpm_hdr *tpm_msg; + enum TPMVersion tpm_version; } TPMTestState; void tpm_emu_test_wait_cond(TPMTestState *s); |