Patch "PCI: Always enable ACS even if no ACS Capability" has been added to the 5.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    PCI: Always enable ACS even if no ACS Capability

to the 5.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pci-always-enable-acs-even-if-no-acs-capability.patch
and it can be found in the queue-5.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 75e57ebf1fdc934806624492fbc27c2a2848baf3
Author: Rajat Jain <rajatja@xxxxxxxxxx>
Date:   Wed Oct 28 16:15:45 2020 -0700

    PCI: Always enable ACS even if no ACS Capability
    
    [ Upstream commit 462b58fb033996e999cc213ed0b430d4f22a28fe ]
    
    Some devices support ACS functionality even though they don't have a
    spec-compliant ACS Capability; pci_enable_acs() has a quirk mechanism to
    handle them.
    
    We want to enable ACS whenever possible, but 52fbf5bdeeef ("PCI: Cache ACS
    capability offset in device") inadvertently broke this by calling
    pci_enable_acs() only if we find an ACS Capability.
    
    This resulted in ACS not being enabled for these non-compliant devices,
    which means devices can't be separated into different IOMMU groups, which
    in turn means we may not be able to pass those devices through to VMs, as
    reported by Boris V:
    
      https://lore.kernel.org/r/74aeea93-8a46-5f5a-343c-790d4c655da3@xxxxxxxxxx
    
    Fixes: 52fbf5bdeeef ("PCI: Cache ACS capability offset in device")
    Link: https://lore.kernel.org/r/20201028231545.4116866-1-rajatja@xxxxxxxxxx
    Reported-by: Boris V <borisvk@xxxxxxxxxx>
    Signed-off-by: Rajat Jain <rajatja@xxxxxxxxxx>
    Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
    Reviewed-by: Alex Williamson <alex.williamson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e39c5499770ff..b2fed944903e2 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3503,8 +3503,13 @@ void pci_acs_init(struct pci_dev *dev)
 {
 	dev->acs_cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS);
 
-	if (dev->acs_cap)
-		pci_enable_acs(dev);
+	/*
+	 * Attempt to enable ACS regardless of capability because some Root
+	 * Ports (e.g. those quirked with *_intel_pch_acs_*) do not have
+	 * the standard ACS capability but still support ACS via those
+	 * quirks.
+	 */
+	pci_enable_acs(dev);
 }
 
 /**



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux