Re: TPM selftest failure in 4.15 (Dell XPS 13, Nuvoton 6xx)

James Bottomley
2018-02-02T05:46:39Z

On Thu, 2018-02-01 at 15:22 -0700, Jason Gunthorpe wrote:
> On Thu, Feb 01, 2018 at 09:06:55PM +0000, Mario.Limonciello@dell.com
> wrote:
>
> >
> > I discussed this with some folks and although it would fix the
> > problem it is not accurately characterizing the situation. What is
> > likely happening here is that issuing the self test command in
> > succession is causing the TPM to restart the self test and not
> > complete. Instead the selfTestDone bit should be polled.
>
> Oh, I wonder if that is beacuse this was copied from the TPM1 version
> where we don't have a bit like that??
>
> Should we check this selfTestDone bit before event sending the self
> test?

The proposed patch already takes care of that by only sending the self
test once. I suppose checking the selfTestDone bit and not sending a
self test at all could be an additional optimization on top, though.

James