Linux 5.6 KVM Expands AMD APIC Virtualization Support With Dynamic APICv

Written by Michael Larabel in AMD on 6 February 2020 at 11:12 AM EST. 2 Comments
AMD
A second round of KVM virtualization updates were sent out today for the Linux 5.6 merge window that is still open through the weekend.

On the AMD side, this round of Linux KVM virtualization updates has expanded support for APIC virtualization. APICv/AVIC is now supported with AMD SVM in configurations previously not possible. AMD's Suravee Suthikulpanit previously explained:
The 'commit 67034bb9dd5e ("KVM: SVM: Add irqchip_split() checks before enabling AVIC")' was introduced to fix miscellaneous boot-hang issues when enable AVIC. This is mainly due to AVIC hardware doest not #vmexit on write to LAPIC EOI register resulting in-kernel PIC and IOAPIC to wait and do not inject new interrupts (e.g. PIT, RTC).

This limits AVIC to only work with kernel_irqchip=split mode, which is not currently enabled by default, and also required user-space to support split irqchip model, which might not be the case.

The goal of this series is to enable AVIC to work in both irqchip modes, by allowing AVIC to be deactivated temporarily during runtime, and fallback to legacy interrupt injection mode (w/ vINTR and interrupt windows) when needed, and then re-enabled subsequently (a.k.a Dynamic APICv).

Advanced Virtual Interrupt Controller is one of the means of reducing overhead in virtualized environments and has been supported for years already in AMD CPUs (since Carrizo) and the Linux kernel but with some exceptions as noted. This dynamic APICv/AVIC activation will be part of Linux 5.6 that in turn should be released as the stable kernel around APril.

The KVM pull request also includes various other x86 KVM fixes, several s390 fixes, and other fixing.
Related News
About The Author
Michael Larabel

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