]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: SVM: Delete IRTE link from previous vCPU before setting new IRTE
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 22:45:08 +0000 (15:45 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 20 Jun 2025 20:52:54 +0000 (13:52 -0700)
commit0a917e9d4b7070fafcbf7a8ec32d2aa444b4e757
treef3e01e186ba2b00a1e38156db85f9df244f848e3
parent05c5e23657e1d61c271c2f4a3a21d4d630b18a9b
KVM: SVM: Delete IRTE link from previous vCPU before setting new IRTE

Delete the previous per-vCPU IRTE link prior to modifying the IRTE.  If
forcing the IRTE back to remapped mode fails, the IRQ is already broken;
keeping stale metadata won't change that, and the IOMMU should be
sufficiently paranoid to sanitize the IRTE when the IRQ is freed and
reallocated.

This will allow hoisting the vCPU tracking to common x86, which in turn
will allow most of the IRTE update code to be deduplicated.

Tested-by: Sairaj Kodilkar <sarunkod@amd.com>
Link: https://lore.kernel.org/r/20250611224604.313496-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/avic.c
include/linux/kvm_irqfd.h