Hi ----- Original Message ----- > On Tue, 2017-10-10 at 00:56 +0200, Marc-André Lureau wrote: > > 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.lur...@redhat.com> > > --- > > include/sysemu/tpm_backend.h | 7 ++++--- > > backends/tpm.c | 12 +++++++++--- > > hw/tpm/tpm_emulator.c | 4 ++-- > > hw/tpm/tpm_passthrough.c | 4 ++-- > > hw/tpm/tpm_tis.c | 2 +- > > 5 files changed, 18 insertions(+), 11 deletions(-) > > > > diff --git a/include/sysemu/tpm_backend.h > > b/include/sysemu/tpm_backend.h > > index 03ea5a3400..8d08765b3c 100644 > > --- a/include/sysemu/tpm_backend.h > > +++ b/include/sysemu/tpm_backend.h > > @@ -18,6 +18,7 @@ > > #include "qapi-types.h" > > #include "qemu/option.h" > > #include "sysemu/tpm.h" > > +#include "hw/tpm/tpm_int.h" > This is not supposed to be internal header?
You are right, moving the interface to include/sysemu/tpm.h directly, to avoid that header inclusion and later code churn in patch "tpm: lookup the the TPM interface" thanks