Re: [PATCH v5 07/22] x86/virt/tdx: Implement SEAMCALL function

From: Dave Hansen
Date: Fri Jun 24 2022 - 14:38:46 EST


On 6/22/22 04:16, Kai Huang wrote:
> SEAMCALL instruction causes #GP when SEAMRR isn't enabled, and #UD when
> CPU is not in VMX operation. The TDX_MODULE_CALL macro doesn't handle
> SEAMCALL exceptions. Leave to the caller to guarantee those conditions
> before calling __seamcall().

I was trying to make the argument earlier that you don't need *ANY*
detection for TDX, other than the ability to make a SEAMCALL.
Basically, patch 01/22 could go away.

You are right that:

The TDX_MODULE_CALL macro doesn't handle SEAMCALL exceptions.

But, it's also not hard to make it *able* to handle exceptions.

So what does patch 01/22 buy us? One EXTABLE entry?