mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-07-08 18:13:59 +02:00
iommu/amd: Return an error if vCPU affinity is set for non-vCPU IRTE
[ Upstream commit07172206a2] 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:d98de49a53("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
11bccb054c
commit
9e75c93472
@@ -3589,7 +3589,7 @@ static int amd_ir_set_vcpu_affinity(struct irq_data *data, void *vcpu_info)
|
||||
* we should not modify the IRTE
|
||||
*/
|
||||
if (!dev_data || !dev_data->use_vapic)
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
|
||||
ir_data->cfg = irqd_cfg(data);
|
||||
pi_data->ir_data = ir_data;
|
||||
|
||||
Reference in New Issue
Block a user