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>
This commit is contained in:
Marc-André Lureau 2017-11-06 19:39:00 +01:00 committed by Stefan Berger
parent 67af320cd6
commit 8a89c9ac15
6 changed files with 18 additions and 11 deletions

View file

@ -12,8 +12,8 @@
#ifndef QEMU_TPM_H
#define QEMU_TPM_H
#include "qemu/option.h"
#include "qom/object.h"
#include "qapi-types.h"
typedef struct TPMState TPMState;