]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: SVM: WARN if ir_list is non-empty at vCPU free
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 22:45:55 +0000 (15:45 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 23 Jun 2025 16:50:46 +0000 (09:50 -0700)
commit99836eb9c5dcae1f0e64da2cb6f7e0bb9151f95d
treec60664e996ce09ba2b6af0c0c99387d391f99520
parent25ef059e8bc51219f18fb7444aff1907960a3a53
KVM: SVM: WARN if ir_list is non-empty at vCPU free

Now that AVIC IRTE tracking is in a mostly sane state, WARN if a vCPU is
freed with ir_list entries, i.e. if KVM leaves a dangling IRTE.

Initialize the per-vCPU interrupt remapping list and its lock even if AVIC
is disabled so that the WARN doesn't hit false positives (and so that KVM
doesn't need to call into AVIC code for a simple sanity check).

Link: https://lore.kernel.org/r/20250611224604.313496-54-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/avic.c
arch/x86/kvm/svm/svm.c