tpm_tis: Return TPM_VERSION_UNSPEC in case of BE failure
commitad4aca69bbd40663ca93a3eb1d8042c023b9b407
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Sat, 11 Nov 2017 03:07:35 +0000 (10 22:07 -0500)
committerStefan Berger <Stefan Berger stefanb@linux.vnet.ibm.com>
Wed, 15 Nov 2017 11:47:35 +0000 (15 06:47 -0500)
tree03d43489d3c2afe503de706c76a8e139d58f7b61
parent17b1af773ed81a9167abfa09749ab92bd05740b0
tpm_tis: Return TPM_VERSION_UNSPEC in case of BE failure

In case the backend has a failure, such as the tpm_emulator's CMD_INIT
failing, the TIS goes into failure mode and does not respond to reads
or writes to MMIO registers. In this case we need to prevent the ACPI
table from being added and the straight-forward way is to indicate that
there's no known TPM version being used.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
hw/tpm/tpm_tis.c