]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/amd: Return an error if vCPU affinity is set for non-vCPU IRTE
authorSean Christopherson <seanjc@google.com>
Fri, 4 Apr 2025 19:38:20 +0000 (12:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:50:45 +0000 (07:50 +0200)
commit415f3481ca764318099f05c2c8edefe070922a95
treecb9a1e0ffeae46c37a95cbe30fffbfd271388759
parent1d7c4b2b0bbfb09b55b2dc0e2355d7936bf89381
iommu/amd: Return an error if vCPU affinity is set for non-vCPU IRTE

[ Upstream commit 07172206a26dcf3f0bf7c3ecaadd4242b008ea54 ]

Return -EINVAL instead of success if amd_ir_set_vcpu_affinity() is
invoked without use_vapic; lying to KVM about whether or not the IRTE was
configured to post IRQs is all kinds of bad.

Fixes: d98de49a53e4 ("iommu/amd: Enable vAPIC interrupt remapping mode by default")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20250404193923.1413163-6-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/amd/iommu.c