Skip to content

Commit 32f479d

Browse files
committed
Merge branch 'remotes/lorenzo/pci/vmd'
- Assign VMD IRQ domain before enumeration to avoid IOMMU interrupt remapping errors when MSI-X remapping is disabled (Nirmal Patel) - Revert VMD workaround that kept MSI-X remapping enabled when IOMMU remapping was enabled (Nirmal Patel) * remotes/lorenzo/pci/vmd: PCI: vmd: Revert 2565e5b ("PCI: vmd: Do not disable MSI-X remapping if interrupt remapping is enabled by IOMMU.") PCI: vmd: Assign VMD IRQ domain before enumeration
2 parents efa3158 + c94f732 commit 32f479d

File tree

1 file changed

+4
-3
lines changed
  • drivers/pci/controller

1 file changed

+4
-3
lines changed

drivers/pci/controller/vmd.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
#include <linux/device.h>
88
#include <linux/interrupt.h>
9-
#include <linux/iommu.h>
109
#include <linux/irq.h>
1110
#include <linux/kernel.h>
1211
#include <linux/module.h>
@@ -813,8 +812,7 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
813812
* acceptable because the guest is usually CPU-limited and MSI
814813
* remapping doesn't become a performance bottleneck.
815814
*/
816-
if (iommu_capable(vmd->dev->dev.bus, IOMMU_CAP_INTR_REMAP) ||
817-
!(features & VMD_FEAT_CAN_BYPASS_MSI_REMAP) ||
815+
if (!(features & VMD_FEAT_CAN_BYPASS_MSI_REMAP) ||
818816
offset[0] || offset[1]) {
819817
ret = vmd_alloc_irqs(vmd);
820818
if (ret)
@@ -853,6 +851,9 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
853851
vmd_attach_resources(vmd);
854852
if (vmd->irq_domain)
855853
dev_set_msi_domain(&vmd->bus->dev, vmd->irq_domain);
854+
else
855+
dev_set_msi_domain(&vmd->bus->dev,
856+
dev_get_msi_domain(&vmd->dev->dev));
856857

857858
vmd_acpi_begin();
858859

0 commit comments

Comments
 (0)