OpenCloudOS-Kernel/arch/x86/kvm/mmu
Sean Christopherson 03ca4589fa KVM: x86: Prevent KVM SVM from loading on kernels with 5-level paging
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: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210505204221.1934471-1-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-05-07 06:06:21 -04:00
..
mmu.c KVM: x86: Prevent KVM SVM from loading on kernels with 5-level paging 2021-05-07 06:06:21 -04:00
mmu_audit.c KVM: x86/mmu: Use '0' as the one and only value for an invalid PAE root 2021-03-15 04:44:07 -04:00
mmu_internal.h ARM: 2021-05-01 10:14:08 -07:00
mmutrace.h kvm: x86/mmu: Add TDP MMU SPTE changed trace point 2020-11-19 10:57:16 -05:00
page_track.c KVM: x86/mmu: Use an rwlock for the x86 MMU 2021-02-04 05:27:43 -05:00
paging_tmpl.h KVM: x86/mmu: Make Host-writable and MMU-writable bit locations dynamic 2021-03-15 04:43:49 -04:00
spte.c KVM: x86/mmu: Use low available bits for removed SPTEs 2021-03-15 04:43:54 -04:00
spte.h KVM: x86/mmu: Use low available bits for removed SPTEs 2021-03-15 04:43:54 -04:00
tdp_iter.c KVM: x86/mmu: Store the address space ID in the TDP iterator 2021-03-16 14:16:34 -04:00
tdp_iter.h KVM: x86/mmu: Store the address space ID in the TDP iterator 2021-03-16 14:16:34 -04:00
tdp_mmu.c KVM: x86/mmu: Fix kdoc of __handle_changed_spte 2021-05-03 11:25:39 -04:00
tdp_mmu.h KVM: x86/mmu: Tear down roots before kvm_mmu_zap_all_fast returns 2021-04-19 18:04:45 -04:00