iommu/amd: Return an error if vCPU affinity is set for non-vCPU IRTE

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>

authored by Sean Christopherson and committed by Paolo Bonzini 07172206 f1fb088d

+1 -1
+1 -1
drivers/iommu/amd/iommu.c
··· 3879 3879 * we should not modify the IRTE 3880 3880 */ 3881 3881 if (!dev_data || !dev_data->use_vapic) 3882 - return 0; 3882 + return -EINVAL; 3883 3883 3884 3884 ir_data->cfg = irqd_cfg(data); 3885 3885 pi_data->ir_data = ir_data;