OSDN Git Service

tpm-backend: store TPMIf interface, improve backend_init()
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 6 Nov 2017 18:39:00 +0000 (19:39 +0100)
committerStefan Berger <stefanb@linux.vnet.ibm.com>
Fri, 15 Dec 2017 04:39:13 +0000 (23:39 -0500)
commit8a89c9ac15981c2d15ce4ee6d6ad67da58824a04
tree0934508cd312e375675a7977026be1d77dc346d3
parent67af320cd653a107c0bbdf0d2e6c51b24403c64d
tpm-backend: store TPMIf interface, improve backend_init()

Store the TPM interface, the actual object may be different from
TPMState. Keep a reference on the interface, and check the backend
wasn't already initialized.

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