Re: [PATCH v3 8/8] x86/virt/tdx: Don't initialize module that doesn't support NO_RBP_MOD feature
From: Dan Williams
Date: Fri Sep 06 2024 - 19:37:12 EST
How about:
Subject: x86/virt/tdx: Require the module to assert it has the NO_RBP_MOD mitigation
...to avoid the double negative.
Kai Huang wrote:
> Old TDX modules can clobber RBP in the TDH.VP.ENTER SEAMCALL. However
> RBP is used as frame pointer in the x86_64 calling convention, and
> clobbering RBP could result in bad things like being unable to unwind
> the stack if any non-maskable exceptions (NMI, #MC etc) happens in that
> gap.
>
> A new "NO_RBP_MOD" feature was introduced to more recent TDX modules to
> not clobber RBP. This feature is reported in the TDX_FEATURES0 global
> metadata field via bit 18.
>
> Don't initialize the TDX module if this feature is not supported [1].
>
> Link: https://lore.kernel.org/all/c0067319-2653-4cbd-8fee-1ccf21b1e646@xxxxxxxx/T/#mef98469c51e2382ead2c537ea189752360bd2bef [1]
Trim this to the direct message-id format, but otherwise:
Reviewed-by: Dan Williams <dan.j.williams@xxxxxxxxx>