diff options
author | Jon Derrick <jonathan.derrick@intel.com> | 2021-02-10 09:13:14 -0700 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2021-03-22 14:08:20 +0000 |
commit | 9b4a824b889e1cc5e0430b80e40cfe9838c5b5f0 (patch) | |
tree | ef9780302a4204477d2978fc83baaaf93091be26 | |
parent | a38fd8748464831584a19438cbb3082b5a2dab15 (diff) | |
download | lwn-9b4a824b889e1cc5e0430b80e40cfe9838c5b5f0.tar.gz lwn-9b4a824b889e1cc5e0430b80e40cfe9838c5b5f0.zip |
iommu/vt-d: Use Real PCI DMA device for IRTE
VMD retransmits child device MSI-X with the VMD endpoint's requester-id.
In order to support direct interrupt remapping of VMD child devices,
ensure that the IRTE is programmed with the VMD endpoint's requester-id
using pci_real_dma_dev().
Link: https://lore.kernel.org/r/20210210161315.316097-2-jonathan.derrick@intel.com
Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Acked-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/intel/irq_remapping.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/intel/irq_remapping.c b/drivers/iommu/intel/irq_remapping.c index 611ef5243cb6..75429a5373ec 100644 --- a/drivers/iommu/intel/irq_remapping.c +++ b/drivers/iommu/intel/irq_remapping.c @@ -1280,7 +1280,8 @@ static void intel_irq_remapping_prepare_irte(struct intel_ir_data *data, break; case X86_IRQ_ALLOC_TYPE_PCI_MSI: case X86_IRQ_ALLOC_TYPE_PCI_MSIX: - set_msi_sid(irte, msi_desc_to_pci_dev(info->desc)); + set_msi_sid(irte, + pci_real_dma_dev(msi_desc_to_pci_dev(info->desc))); break; default: BUG_ON(1); |