KVM: Pass new routing entries and irqfd when updating IRTEs
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 22:45:06 +0000 (15:45 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 20 Jun 2025 20:52:53 +0000 (13:52 -0700)
commitcb210737675ef4c1ad88721e84558eeb2f199312
tree25d0a6c581bd311556040ecea8a5567d5e7d3ccb
parente76c274513f24d92074e36e40f799b44aeb7a0fb
KVM: Pass new routing entries and irqfd when updating IRTEs

When updating IRTEs in response to a GSI routing or IRQ bypass change,
pass the new/current routing information along with the associated irqfd.
This will allow KVM x86 to harden, simplify, and deduplicate its code.

Since adding/removing a bypass producer is now conveniently protected with
irqfds.lock, i.e. can't run concurrently with kvm_irq_routing_update(),
use the routing information cached in the irqfd instead of looking up
the information in the current GSI routing tables.

Opportunistically convert an existing printk() to pr_info() and put its
string onto a single line (old code that strictly adhered to 80 chars).

Link: https://lore.kernel.org/r/20250611224604.313496-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/arm64/kvm/arm.c
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/avic.c
arch/x86/kvm/svm/svm.h
arch/x86/kvm/vmx/posted_intr.c
arch/x86/kvm/vmx/posted_intr.h
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/eventfd.c