On 16.06.24 г. 15:01 ч., 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] Signed-off-by: Kai Huang <kai.huang@xxxxxxxxx>
Reviewed-by: Nikolay Borisov <nik.borisov@xxxxxxxx>