lkml.org 
[lkml]   [2023]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v8 3/6] KVM: x86: Virtualize CR3.LAM_{U48,U57}
From


On 5/10/2023 4:58 PM, Chao Gao wrote:
>> @@ -7743,6 +7744,9 @@ static void vmx_vcpu_after_set_cpuid(struct kvm_vcpu *vcpu)
>> vmx->msr_ia32_feature_control_valid_bits &=
>> ~FEAT_CTL_SGX_LC_ENABLED;
>>
>> + if (guest_cpuid_has(vcpu, X86_FEATURE_LAM))
>> + vcpu->arch.cr3_ctrl_bits |= X86_CR3_LAM_U48 | X86_CR3_LAM_U57;
> This function can be called multiple times. We need to clear LAM bits if LAM
> isn't exposed to the guest, i.e.,
>
> else
> vcpu->arch.cr3_ctrl_bits &= ~(X86_CR3_LAM_U48 | X86_CR3_LAM_U57);
Nice catch, will fix it, thanks.


>
> With this fixed,
>
> Reviewed-by: Chao Gao <chao.gao@intel.com>

\
 
 \ /
  Last update: 2023-05-11 03:28    [W:0.065 / U:1.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site