Re: [PATCH v2 1/3] KVM: x86: Allow CPU to force vendor-specific TDP level

From: Paolo Bonzini
Date: Tue Aug 10 2021 - 05:24:02 EST


On 09/08/21 23:49, Jim Mattson wrote:
Doesn't this break legacy type 2 hypervisors that don't know anything
about 5-level NPT and don't have any control over whether or not the
host uses 5-level paging?

Yes, where "legacy" probably means "all released versions of all of them", including KVM. Host support for LA57 was merged in 4.13, while KVM started supporting 5-level page tables in EPT in 4.14 and even then just returned PT64_ROOT_LEVEL (i.e. 4) for the maximum NPT level.

So all Linux versions up to 5.13, which has "KVM: x86: Prevent KVM SVM from loading on kernels with 5-level paging", will break horribly. Better backport that patch to stable...

Paolo