Re: [RFC v2 16/32] x86/tdx: Handle MWAIT, MONITOR and WBINVD

From: Dave Hansen
Date: Tue May 11 2021 - 12:04:52 EST


On 5/11/21 8:52 AM, Andi Kleen wrote:
>> The 'default' case in this 'switch' prints the exit reason and faults,
>> can't that also trigger a backtrace that dumps the exception stack and
>> the faulting instruction? In other words shouldn't this just fail with
>> a common way to provide better debug on any unhandled #VE and not try
>> to continue running past something that "can't" happen?
>
> It will use the #GP common code which will do all the backtracing etc.
>
> We didn't think we would need anything else than what #GP already does.

How do these end up in practice? Do they still say "general protection
fault..."?

Isn't that really mean for anyone that goes trying to figure out what
caused these? If they see a "general protection fault" from WBINVD and
go digging in the SDM for how a #GP can come from WBINVD, won't they be
sorely disappointed?