summaryrefslogtreecommitdiffstats
path: root/tests/qtest/bios-tables-test.c
diff options
context:
space:
mode:
authorStefan Berger2021-08-02 23:52:38 +0200
committerStefan Berger2021-08-31 23:33:11 +0200
commit09b20a148afeebe2084c92672d3acaa26a371296 (patch)
tree537307e3133dc01e8c12ac5612c2e03d49a52c35 /tests/qtest/bios-tables-test.c
parenttests: Rename TestState to TPMTestState (diff)
downloadqemu-09b20a148afeebe2084c92672d3acaa26a371296.tar.gz
qemu-09b20a148afeebe2084c92672d3acaa26a371296.tar.xz
qemu-09b20a148afeebe2084c92672d3acaa26a371296.zip
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/bios-tables-test.c')
-rw-r--r--tests/qtest/bios-tables-test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index a622f91a37..93c9d306b5 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -1092,7 +1092,7 @@ static void test_acpi_piix4_tcg_numamem(void)
uint64_t tpm_tis_base_addr;
static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if,
- uint64_t base)
+ uint64_t base, enum TPMVersion tpm_version)
{
#ifdef CONFIG_TPM
gchar *tmp_dir_name = g_strdup_printf("qemu-test_acpi_%s_tcg_%s.XXXXXX",
@@ -1113,6 +1113,7 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if,
g_mutex_init(&test.data_mutex);
g_cond_init(&test.data_cond);
test.data_cond_signal = false;
+ test.tpm_version = tpm_version;
thread = g_thread_new(NULL, tpm_emu_ctrl_thread, &test);
tpm_emu_test_wait_cond(&test);
@@ -1145,7 +1146,7 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if,
static void test_acpi_q35_tcg_tpm_tis(void)
{
- test_acpi_tcg_tpm("q35", "tis", 0xFED40000);
+ test_acpi_tcg_tpm("q35", "tis", 0xFED40000, TPM_VERSION_2_0);
}
static void test_acpi_tcg_dimm_pxm(const char *machine)