mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 17:01:14 +00: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
1 changed files with 4 additions and 3 deletions
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/iommu.h>
|
|
||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.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
|
* acceptable because the guest is usually CPU-limited and MSI
|
||||||
* remapping doesn't become a performance bottleneck.
|
* remapping doesn't become a performance bottleneck.
|
||||||
*/
|
*/
|
||||||
if (iommu_capable(vmd->dev->dev.bus, IOMMU_CAP_INTR_REMAP) ||
|
if (!(features & VMD_FEAT_CAN_BYPASS_MSI_REMAP) ||
|
||||||
!(features & VMD_FEAT_CAN_BYPASS_MSI_REMAP) ||
|
|
||||||
offset[0] || offset[1]) {
|
offset[0] || offset[1]) {
|
||||||
ret = vmd_alloc_irqs(vmd);
|
ret = vmd_alloc_irqs(vmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -853,6 +851,9 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
|
||||||
vmd_attach_resources(vmd);
|
vmd_attach_resources(vmd);
|
||||||
if (vmd->irq_domain)
|
if (vmd->irq_domain)
|
||||||
dev_set_msi_domain(&vmd->bus->dev, 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();
|
vmd_acpi_begin();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue