Re: [PATCH v6 17/22] x86/virt/tdx: Avoid updates during update-sensitive operations

From: Kiryl Shutsemau

Date: Tue Mar 31 2026 - 08:26:26 EST


On Tue, Mar 31, 2026 at 10:34:04AM +0800, Chao Gao wrote:
> On Mon, Mar 30, 2026 at 01:07:27PM +0000, Kiryl Shutsemau wrote:
> >On Thu, Mar 26, 2026 at 01:44:08AM -0700, Chao Gao wrote:
> >> + if (tdx_sysinfo.features.tdx_features0 & TDX_FEATURES0_UPDATE_COMPAT)
> >> + args.rcx |= TDX_SYS_SHUTDOWN_AVOID_COMPAT_SENSITIVE;
> >
> >I think you need to explain what would happen if the feature is not
> >supported.
>
> I included this explanation in the changelog:
>
> When the "avoid update-sensitive" feature isn't supported by the TDX
> module, proceed with updates and let userspace update at their own risk.
> ...
>
> Do you mean making it more explicit:
>
> When the "avoid update-sensitive" feature isn't supported, proceed with
> updates. If a race occurs between module update and update-sensitive
> operations, failures happen at a later stage (e.g., incorrect TD
> measurements in attestation reports for TD build). Effectively, this
> means "let userspace update at their own risk." ...

I missed that, sorry. But the more explicit version is better.

--
Kiryl Shutsemau / Kirill A. Shutemov