Re: [RFC PATCH 06/15] virt: tdx-guest: Support TDI bind and unbind operations

From: Jason Gunthorpe

Date: Wed Nov 11 2026 - 10:34:23 EST


On Wed, Nov 11, 2026 at 09:44:42AM +0000, Tian, Kevin wrote:

> The interesting case is about such failures after attest e.g. unlock
> which is supposed to be a void operation. Maybe we don't need do
> anything special in tsm core - the secure firmware maintains the
> state machine so future lock will fail if the current state is not
> unlocked.

unlock can't fail, we have no way to cope with that.

If unlock does not result in the MMMIO returned to host control then
the system will surely MCE.

This should have nothing to do with a crashed device, the disposition
of the MMIO is under TDX module control, revert it back to host and
accept you get AERs for the incorrect T= bit if the device isn't syncd.

The OS would have to kill the SPDM session and FLR the PF to bring it
all back.

Jason