lkml.org 
[lkml]   [2021]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC v2 16/32] x86/tdx: Handle MWAIT, MONITOR and WBINVD
From
Date

On 5/10/2021 7:44 PM, Kuppuswamy, Sathyanarayanan wrote:
>
>
> On 5/10/21 7:17 PM, Andi Kleen wrote:
>>>> To prevent TD guest from using MWAIT/MONITOR instructions,
>>>> support for these instructions are already disabled by TDX
>>>> module (SEAM). So CPUID flags for these instructions should
>>>> be in disabled state.
>>> Why does this not result in a #UD if the instruction is disabled by
>>> SEAM?
>>
>> It's just the TDX module (SEAM is the execution mode used by the TDX
>> module)
>
> If it is disabled by the TDX Module, we should never execute it. But
> for some
> reason, if we still come across this instruction (buggy TDX module?),
> we add
> appropriate warning in  #VE handler.

I think the only case where it could happen is if the kernel jumps to a
random address due to a bug and the destination happens to be these
instruction bytes. Of course it is exceedingly unlikely.

Or we make some mistake, but that's hopefully fixed quickly.


-Andi

\
 
 \ /
  Last update: 2021-05-11 04:52    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog