AMD Sends Out Linux Patches For x2APIC Virtualization, Increases KVM Limit To 511 vCPUs
Written by Michael Larabel in AMD on 21 February 2022 at 06:05 AM EST. 1 Comment
AMD --
AMD engineers on Sunday night sent out a patch series getting x2APIC virtualization "x2AVIC" support for the AMD SVM driver with the Kernel-based Virtual Machine (KVM).

Some areas of AMD's virtualization support for the mainline kernel haven't been as punctual as desired. For example, SEV-SNP with last year's EPYC 7003 series processors still doesn't have its new feature code mainlined but still going through the review process every so often with new revisions. (At least AMD has been offering a tree on GitHub with the SEV-SNP in-progress kernel code for interested customers.)

Another AMD virtualization item that I thought was squared away already but turns out is only now seeing patches is for AMD x2APIC virtualization support. AMD x2APIC support outside of the virtualization scope has been supported since 2018 with Linux for EPYC 7002 series and newer; the work this week is about x2APIC virtualization, which Intel has had squared away including their Linux support for years (Intel VT-x with Sandy Bridge originally added x2APIC virtualization there). Sent out Sunday night were a set of "request for comments" patches implementing AMD x2APIC virtualization support. The x2APIC virtualization support allows for VMs to have more than 255 CPU threads and allows for better performance than legacy APIC mode for virtualization.


Yep, more vCPUs!


This code gets AMD x2APIC virtualization (x2AVIC) squared away for their KVM kernel code. The patches do go ahead and lift the thread count now from 255 vCPUs up to now a possible 511 vCPU limit. With up through AMD EPYC 7003 series processors having up to 256 threads (128 cores) between two sockets, the existing 255 vCPU limit hasn't been much of an issue with normally some cores/threads being reserved for the host OS for management. However, with Zen 4's Genoa will be up to 96 CPU cores (192 threads) now per socket or with Zen 4C "Bergamo" will be 128 cores per socket.

Besides allowing for up to 511 vCPUs now, the AMD x2APIC virtualization support should lead to better efficiency when used. See the RFC patch series for this tentative AMD x2AVIC support for the Linux kernel.
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, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week