[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 1/2] sysemu: tpm: Add a stub function for TPM_IS_CRB
From: |
Michael S. Tsirkin |
Subject: |
Re: [PATCH v5 1/2] sysemu: tpm: Add a stub function for TPM_IS_CRB |
Date: |
Wed, 23 Nov 2022 01:36:30 -0500 |
On Fri, May 06, 2022 at 09:47:52AM -0400, Stefan Berger wrote:
>
>
> On 5/6/22 09:25, Eric Auger wrote:
> > In a subsequent patch, VFIO will need to recognize if
> > a memory region owner is a TPM CRB device. Hence VFIO
> > needs to use TPM_IS_CRB() even if CONFIG_TPM is unset. So
> > let's add a stub function.
> >
> > Signed-off-by: Eric Auger <eric.auger@redhat.com>
> > Suggested-by: Cornelia Huck <cohuck@redhat.com>
> Reviewed-by: Stefan Berger <stefanb@linnux.ibm.com>
... and now in 7.2 vdpa needs a dependency on tpm too, what a hack :(
And what exactly is it about TPM CRB that everyone needs to
know about it and skip it? The API does not tell ...
> > ---
> > include/sysemu/tpm.h | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
> > index 68b2206463c..fb40e30ff60 100644
> > --- a/include/sysemu/tpm.h
> > +++ b/include/sysemu/tpm.h
> > @@ -80,6 +80,12 @@ static inline TPMVersion tpm_get_version(TPMIf *ti)
> > #define tpm_init() (0)
> > #define tpm_cleanup()
> >
> > +/* needed for an alignment check in non-tpm code */
> > +static inline Object *TPM_IS_CRB(Object *obj)
> > +{
> > + return NULL;
> > +}
> > +
> > #endif /* CONFIG_TPM */
> >
> > #endif /* QEMU_TPM_H */
>
>
- Re: [PATCH v5 1/2] sysemu: tpm: Add a stub function for TPM_IS_CRB,
Michael S. Tsirkin <=