summaryrefslogtreecommitdiffstats
path: root/tests/tpm-emu.c
diff options
context:
space:
mode:
authorStefan Berger2018-02-15 01:51:48 +0100
committerStefan Berger2018-02-21 13:24:50 +0100
commitadb0e917e6ee93631e40265ca145bc31cd3b6c9a (patch)
tree4586a5c8e57d322cde0c44ff92a4bbc3ea414152 /tests/tpm-emu.c
parenttests: Move common TPM test code into tpm-emu.c (diff)
downloadqemu-adb0e917e6ee93631e40265ca145bc31cd3b6c9a.tar.gz
qemu-adb0e917e6ee93631e40265ca145bc31cd3b6c9a.tar.xz
qemu-adb0e917e6ee93631e40265ca145bc31cd3b6c9a.zip
tests: add test for TPM TIS device
Move the TPM TIS related register and flag #defines into include/hw/acpi/tpm.h for access by the test case. Write a test case that covers the TIS functionality. Add the tests cases to the MAINTAINERS file. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'tests/tpm-emu.c')
-rw-r--r--tests/tpm-emu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/tpm-emu.c b/tests/tpm-emu.c
index cbb92afc8f..4dada76834 100644
--- a/tests/tpm-emu.c
+++ b/tests/tpm-emu.c
@@ -155,6 +155,13 @@ void *tpm_emu_ctrl_thread(void *data)
qio_channel_write(ioc, (char *)&loc, sizeof(loc), &error_abort);
break;
}
+ case CMD_GET_TPMESTABLISHED: {
+ ptm_est est = {
+ .u.resp.bit = 0,
+ };
+ qio_channel_write(ioc, (char *)&est, sizeof(est), &error_abort);
+ break;
+ }
default:
g_debug("unimplemented %u", cmd);
g_assert_not_reached();