lkml.org 
[lkml]   [2024]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v8 22/26] KVM: VMX: Set up interception for CET MSRs
From
On 1/17/2024 9:41 AM, Yang, Weijiang wrote:
> On 1/15/2024 5:58 PM, Yuan Yao wrote:
>> On Thu, Dec 21, 2023 at 09:02:35AM -0500, Yang Weijiang wrote:
[...]
>> Looks this leading to MSR_IA32_INT_SSP_TAB not intercepted
>> after below steps:
>>
>> Step 1. User space set cpuid w/ X86_FEATURE_LM, w/ SHSTK.
>> Step 2. User space set cpuid w/o X86_FEATURE_LM, w/o SHSTK.
>>
>> Then MSR_IA32_INT_SSP_TAB won't be intercepted even w/o SHSTK
>> on guest cpuid, will this lead to inconsistency when do
>> rdmsr(MSR_IA32_INT_SSP_TAB) from guest in this scenario ?
> Yes, theoretically it's possible, how about changing it as below?
>
> vmx_set_intercept_for_msr(vcpu, MSR_IA32_INT_SSP_TAB,
> MSR_TYPE_RW,
> incpt | !guest_cpuid_has(vcpu, X86_FEATURE_LM));
>
Oops, should be : incpt || !guest_cpuid_has(vcpu, X86_FEATURE_LM)

\
 
 \ /
  Last update: 2024-01-17 03:06    [W:0.076 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site