Re: [PATCH v3 1/1] x86/tdx: Handle MWAIT, MONITOR and WBINVD

From: Kuppuswamy, Sathyanarayanan
Date: Mon Mar 29 2021 - 19:38:26 EST




On 3/29/21 4:23 PM, Andy Lutomirski wrote:

On Mar 29, 2021, at 4:17 PM, Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx> wrote:

In non-root TDX guest mode, MWAIT, MONITOR and WBINVD instructions
are not supported. So handle #VE due to these instructions
appropriately.

Is there something I missed elsewhere in the code that checks CPL?
We don't check for CPL explicitly. But if we are reaching here, then we
executing these instructions with wrong CPL.


--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer