Skip to content
  • Sean Christopherson's avatar
    KVM: x86: Prevent KVM SVM from loading on kernels with 5-level paging · 03ca4589
    Sean Christopherson authored
    
    
    Disallow loading KVM SVM if 5-level paging is supported.  In theory, NPT
    for L1 should simply work, but there unknowns with respect to how the
    guest's MAXPHYADDR will be handled by hardware.
    
    Nested NPT is more problematic, as running an L1 VMM that is using
    2-level page tables requires stacking single-entry PDP and PML4 tables in
    KVM's NPT for L2, as there are no equivalent entries in L1's NPT to
    shadow.  Barring hardware magic, for 5-level paging, KVM would need stack
    another layer to handle PML5.
    
    Opportunistically rename the lm_root pointer, which is used for the
    aforementioned stacking when shadowing 2-level L1 NPT, to pml4_root to
    call out that it's specifically for PML4.
    
    Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20210505204221.1934471-1-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    03ca4589