Linux 5.15 KVM Defaults To The New x86 TDP MMU, Enables AMD SVM 5-Level Paging
Written by Michael Larabel in Virtualization on 7 September 2021 at 02:43 PM EDT. 9 Comments
VIRTUALIZATION --
The Linux 5.15 Kernel-based Virtual Machine (KVM) changes this cycle are quite exciting on the x86 (x86_64) front with several prominent additions.

The KVM feature updates were sent in today for this new kernel cycle. While there are Arm and IBM s390 updates, the x86/x86_64 work is most notable for KVM in Linux 5.15.

Earlier this year during the Linux 5.12 cycle the hope was KVM would switch to the new x86 MMU code by default later in the cycle but that didn't happen... Now a few kernels later with continuing to improve the new MMU, it's now the default with Linux 5.15.

The new TDP MMU by default for x86 64-bit machines in Linux 5.15 comes after the fast/lock-less page fault support was added. Red Hat's Paolo Bonzini commented with the change, "With the addition of fast page fault support, the TDP-specific MMU has reached feature parity with the original MMU. All my testing in the last few months has been done with the TDP MMU; switch the default on 64-bit machines."

TDP in this context is the Two-Dimension Paging MMU. Over the past year Google has been working heavily on this TDP MMU that allows for greater parallelism and scalability compared to the original KVM x86 MMU code. Their motivating factors in writing this new MMU code were being able to handle page faults in parallel and handle live migration with some of their virtual machines containing 400+ vCPUs and 12+ TiB of memory.

The KVM x86 work for Linux 5.15 also now bumps the maximum vCPU count up to 1024 from a prior KVM_MAX_VCPUS limit of 288 while the "soft" limit has been set to 710 for now. The x86 work also includes optimizations to the toggling of AMD AVIC, support for 5-level page tables on AMD processors, and other improvements. The AMD KVM code now supporting 5-level page tables I wrote about last month with the AMD Linux work for 5-level paging and will presumably be supported with next-gen AMD EPYC "Genoa" processors.

The full list of KVM patches for Linux 5.15 via this pull request.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week