lkml.org 
[lkml]   [2023]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 4/6] KVM: x86: Introduce untag_addr() in kvm_x86_ops
On Thu, Jun 29, 2023 at 02:12:27PM +0800, Binbin Wu wrote:
>> > + /*
>> > + * Check LAM_U48 in cr3_ctrl_bits to avoid guest_cpuid_has().
>> > + * If not set, vCPU doesn't supports LAM.
>> > + */
>> > + if (!(vcpu->arch.cr3_ctrl_bits & X86_CR3_LAM_U48) ||
>> This is unnecessary, KVM should never allow the LAM bits in CR3 to be set if LAM
>> isn't supported.

A corner case is:

If EPT is enabled, CR3 writes are not trapped. then guests can set the
LAM bits in CR3 if hardware supports LAM regardless whether or not guest
enumerates LAM.

\
 
 \ /
  Last update: 2023-06-29 08:59    [W:0.056 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site