iommu/amd: WARN if KVM attempts to set vCPU affinity without posted intrrupts
authorSean Christopherson <seanjc@google.com>
Fri, 4 Apr 2025 19:38:21 +0000 (12:38 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Apr 2025 13:52:31 +0000 (09:52 -0400)
commitaae251a380fe4741594368e0d7836a082b17ae3e
tree3cb2964965b069259e31998013ea4fd7e5efc7dc
parent07172206a26dcf3f0bf7c3ecaadd4242b008ea54
iommu/amd: WARN if KVM attempts to set vCPU affinity without posted intrrupts

WARN if KVM attempts to set vCPU affinity when posted interrupts aren't
enabled, as KVM shouldn't try to enable posting when they're unsupported,
and the IOMMU driver darn well should only advertise posting support when
AMD_IOMMU_GUEST_IR_VAPIC() is true.

Note, KVM consumes is_guest_mode only on success.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20250404193923.1413163-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
drivers/iommu/amd/iommu.c