On Thu, 2018-02-01 at 15:22 -0700, Jason Gunthorpe wrote: > On Thu, Feb 01, 2018 at 09:06:55PM +0000, Mario.Limonciello@xxxxxxxx > 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