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

2021-03-30 Thread Kuppuswamy, Sathyanarayanan
On 3/30/21 8:10 AM, Dave Hansen wrote: On 3/30/21 8:00 AM, Andi Kleen wrote: + /* MWAIT is not supported in TDX platform, so suppress it */ + setup_clear_cpu_cap(X86_FEATURE_MWAIT); In fact, MWAIT bit returned by CPUID instruction is zero for TD guest. This is enforced by SEAM

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

2021-03-30 Thread Dave Hansen
On 3/30/21 8:00 AM, Andi Kleen wrote: >>> + /* MWAIT is not supported in TDX platform, so suppress it */ >>> + setup_clear_cpu_cap(X86_FEATURE_MWAIT); >> In fact, MWAIT bit returned by CPUID instruction is zero for TD guest. This >> is enforced by SEAM module. > Good point. >> Do we still need

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

2021-03-30 Thread Andi Kleen
On Tue, Mar 30, 2021 at 12:56:41PM +0800, Xiaoyao Li wrote: > On 3/27/2021 8:18 AM, Kuppuswamy Sathyanarayanan wrote: > > In non-root TDX guest mode, MWAIT, MONITOR and WBINVD instructions > > are not supported. So handle #VE due to these instructions as no ops. > > > > Signed-off-by: Kuppuswamy

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

2021-03-29 Thread Xiaoyao Li
On 3/27/2021 8:18 AM, Kuppuswamy Sathyanarayanan wrote: In non-root TDX guest mode, MWAIT, MONITOR and WBINVD instructions are not supported. So handle #VE due to these instructions as no ops. Signed-off-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andi Kleen --- Changes since previous

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

2021-03-27 Thread Andy Lutomirski
> On Mar 26, 2021, at 8:40 PM, Kuppuswamy, Sathyanarayanan > wrote: > >  > > On 3/26/21 7:40 PM, Andy Lutomirski wrote: On Mar 26, 2021, at 5:18 PM, Kuppuswamy Sathyanarayanan wrote: >>> >>> In non-root TDX guest mode, MWAIT, MONITOR and WBINVD instructions >>> are not

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

2021-03-26 Thread Kuppuswamy, Sathyanarayanan
On 3/26/21 7:40 PM, Andy Lutomirski wrote: On Mar 26, 2021, at 5:18 PM, Kuppuswamy Sathyanarayanan wrote: In non-root TDX guest mode, MWAIT, MONITOR and WBINVD instructions are not supported. So handle #VE due to these instructions as no ops. These should at least be WARN. I will

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

2021-03-26 Thread Andy Lutomirski
> On Mar 26, 2021, at 5:18 PM, Kuppuswamy Sathyanarayanan > wrote: > > In non-root TDX guest mode, MWAIT, MONITOR and WBINVD instructions > are not supported. So handle #VE due to these instructions as no ops. These should at least be WARN. Does TDX send #UD if these instructions have the

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

2021-03-26 Thread Kuppuswamy Sathyanarayanan
In non-root TDX guest mode, MWAIT, MONITOR and WBINVD instructions are not supported. So handle #VE due to these instructions as no ops. Signed-off-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andi Kleen --- Changes since previous series: * Suppressed MWAIT feature as per Andi's comment. *