Re: [RFC PATCH 06/15] virt: tdx-guest: Support TDI bind and unbind operations
From: Edgecombe, Rick P
Date: Tue Nov 10 2026 - 13:58:02 EST
On Tue, 2026-11-10 at 09:40 +0000, Duan, Zhenzhong wrote:
>
> I found current implementation did not handle a polling timeout well,
> so I reworked it following the GetQuote implementation. The shared buffer
> is now allocated per device instead of per command. After a timeout,
> further commands fail with -EBUSY until the VMM reports the pending
> command complete, and the buffer is leaked only if that command is still
> pending when the device is unlocked.
>
> Below is the reworked patch that handles polling timeout, I'd like to seek
> comments on this new implementation early, comments welcome!
This leak would be potentially easily user triggerable then? Does TSM have the
ability to return BUSY for the unlock operation while the other operations are
pending? Should it do that instead? Do any other vendors have a similar problem?
I think this is the same pattern as the other thread. We need to understand this
error before deciding on who and how it should be handled.
Additionally, we should probably see if Jason has any opinion on the types of
errors that guest TSM would like to handle.