lkml.org 
[lkml]   [2022]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCHv5 23/30] x86/boot: Avoid #VE during boot for TDX platforms
From
On 3/2/2022 10:27 PM, Kirill A. Shutemov wrote:
> From: Sean Christopherson <seanjc@google.com>
>
> There are a few MSRs and control register bits that the kernel
> normally needs to modify during boot. But, TDX disallows
> modification of these registers to help provide consistent security
> guarantees. Fortunately, TDX ensures that these are all in the correct
> state before the kernel loads, which means the kernel does not need to
> modify them.
>
> The conditions to avoid are:
>
> * Any writes to the EFER MSR
> * Clearing CR3.MCE

typo. CR4.MCE

BTW, I remember there was a patch to clear X86_FEATURE_MCE for TDX
guest. Why does that get dropped?

Even though CPUID reports MCE is supported, all the access to MCE
related MSRs causes #VE. If they are accessed via mce_rdmsrl(), the #VE
will be fixed up and goes to ex_handler_msr_mce(). Finally lead to panic().



\
 
 \ /
  Last update: 2022-03-07 10:44    [W:1.325 / U:1.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site