]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86: Add module param to control and enumerate device posted IRQs
authorSean Christopherson <seanjc@google.com>
Tue, 1 Apr 2025 16:18:04 +0000 (09:18 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 24 Apr 2025 18:18:38 +0000 (11:18 -0700)
commit459074cff66f77af3f327e2c1f9256cdb146d798
tree7207ea8a9a74e15cbc070e0c7d63f93ef461a55c
parentc364baad3e4f114284581c35d4b9006d59d2629a
KVM: x86: Add module param to control and enumerate device posted IRQs

Add a module param to each KVM vendor module to allow disabling device
posted interrupts without having to sacrifice all of APICv/AVIC, and to
also effectively enumerate to userspace whether or not KVM may be
utilizing device posted IRQs.  Disabling device posted interrupts is
very desirable for testing, and can even be desirable for production
environments, e.g. if the host kernel wants to interpose on device
interrupts.

Put the module param in kvm-{amd,intel}.ko instead of kvm.ko to match
the overall APICv/AVIC controls, and to avoid complications with said
controls.  E.g. if the param is in kvm.ko, KVM needs to be snapshot the
original user-defined value to play nice with a vendor module being
reloaded with different enable_apicv settings.

Link: https://lore.kernel.org/r/20250401161804.842968-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c