Skip to content

x86: KVM: Limit guest physical bits when 5-level EPT is unsupported

Tao Su kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 31 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2x86: KVM: Limit guest physical bits when 5-level EPT is unsupportedarch/x86/kvm/cpuid.c arch/x86/kvm/mmu.h arch/x86/kvm/mmu/mmu.c+11 -226 replies
2/2x86: KVM: Emulate instruction when GPA can't be translated by EPTarch/x86/kvm/vmx/vmx.c+7 -05 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchYi LaiXudong Hao
1/2T-b T-b
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] x86: KVM: Limit guest physical bits when 5-level EPT is unsupported

When host doesn't support 5-level EPT, bits 51:48 of the guest physical address must all be zero, otherwise an EPT violation always occurs[1], and current handler can't resolve if the GPA is in RAM region. So, instruction will be re-executed again and again, which causes infinite EPT violation.

Six KVM selftests are timeout due to this issue:
kvm:access_tracking_perf_test
kvm:demand_paging_test
kvm:dirty_log_test
kvm:dirty_log_perf_test
kvm:kvm_page_table_test
kvm:memslot_modification_stress_test

Just report the max supported physical bits and not host physical bits to guest which is limited by TDP.

[1]
https://www.intel.com/content/www/us/en/content-details/671442/5-level-paging-and-5-level-ept-white-paper.html

Tao Su (2):
x86: KVM: Limit guest physical bits when 5-level EPT is unsupported
x86: KVM: Emulate instruction when GPA can't be translated by EPT

 arch/x86/kvm/cpuid.c   | 5 +++--
 arch/x86/kvm/mmu.h     | 1 +
 arch/x86/kvm/mmu/mmu.c | 7 +++++++
 arch/x86/kvm/vmx/vmx.c | 7 +++++++
 4 files changed, 18 insertions(+), 2 deletions(-)

base-commit: ceb6a6f023fd3e8b07761ed900352ef574010bcb

Signature · 1 line
2.34.1