mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
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 2565e5b69c
("PCI: vmd: Do not disable MSI-X remapping if interrupt remapping is enabled by IOMMU.")
PCI: vmd: Assign VMD IRQ domain before enumeration
This commit is contained in:
commit
32f479d05a
@ -6,7 +6,6 @@
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/iommu.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
@ -813,8 +812,7 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
|
||||
* acceptable because the guest is usually CPU-limited and MSI
|
||||
* remapping doesn't become a performance bottleneck.
|
||||
*/
|
||||
if (iommu_capable(vmd->dev->dev.bus, IOMMU_CAP_INTR_REMAP) ||
|
||||
!(features & VMD_FEAT_CAN_BYPASS_MSI_REMAP) ||
|
||||
if (!(features & VMD_FEAT_CAN_BYPASS_MSI_REMAP) ||
|
||||
offset[0] || offset[1]) {
|
||||
ret = vmd_alloc_irqs(vmd);
|
||||
if (ret)
|
||||
@ -853,6 +851,9 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
|
||||
vmd_attach_resources(vmd);
|
||||
if (vmd->irq_domain)
|
||||
dev_set_msi_domain(&vmd->bus->dev, vmd->irq_domain);
|
||||
else
|
||||
dev_set_msi_domain(&vmd->bus->dev,
|
||||
dev_get_msi_domain(&vmd->dev->dev));
|
||||
|
||||
vmd_acpi_begin();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user