Public bug reported:

Team,

This bug is created to understand Ubuntu Kernel team on pull & merge plans in 
resolute ? 
Patch: 
https://patchwork.ozlabs.org/project/linux-pci/patch/[email protected]/

We see this already up streamed to v7.3 version


*** commit details** which explains the issue it is getting addressed 
commit 40cce45b921f7930886bcba43069edc579725457
Author: Nikola Prica <[email protected]>
Date:   Mon Sep 21 13:19:03 2026 +0200

    PCI: Accept AtomicOps already enabled by the hypervisor

    pci_enable_atomic_ops_to_root() currently fails when no Root Port is
    visible. That is common in passthrough guests (ESXi, Hyper-V): the Endpoint
    is assigned to the VM, but the Root Port above it is not visible in the
    guest topology.

    In those setups the hypervisor may already have enabled AtomicOp Requester
    Enable on the device. If PCI_EXP_DEVCTL2_ATOMIC_REQ is set, treat AtomicOps
    as already enabled and return success instead of failing the Root Port
    walk.

    After 1ae8c4ce1570 ("PCI: Enable AtomicOps only if Root Port supports
    them"), pci_enable_atomic_ops_to_root() always returns failure if the Root
    Port is not visible, so drivers don't use atomics when they could.  On
    systems where the Root Port is not visible but *does* support AtomicOps,
    this is a regression: prior to 1ae8c4ce1570, it enabled AtomicOps in the
    endpoint and returned success.

    Fixes: 1ae8c4ce1570 ("PCI: Enable AtomicOps only if Root Port supports 
them")
    Signed-off-by: Nikola Prica <[email protected]>
    [bhelgaas: commit log, code comment]
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Tested-by: Gerd Bayer <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Reviewed-by: Gerd Bayer <[email protected]>
    Link: https://patch.msgid.link/[email protected]

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index b2879a6be5f8..8cc6a89130b5 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3769,8 +3769,21 @@ int pci_enable_atomic_ops_to_root(struct pci_dev *dev, 
u32 cap_mask)
        }

        root = pcie_find_root_port(dev);
-       if (!root)
+       if (!root) {
+
+               /*
+                * A hypervisor may expose a topology with the root port
+                * not visible to the guest.  If the hypervisor has already
+                * set AtomicOp Requester Enable in the endpoint, we assume
+                * it has verified support in the root port, so it is safe
+                * for the driver to use AtomicOps.
+                */
+               pcie_capability_read_dword(dev, PCI_EXP_DEVCTL2, &ctl2);
+               if (ctl2 & PCI_EXP_DEVCTL2_ATOMIC_REQ)
+                       return 0;
+
                return -EINVAL;
+       }

        pcie_capability_read_dword(root, PCI_EXP_DEVCAP2, &cap);
        if ((cap & cap_mask) != cap_mask)
~
~
**

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2172445

Title:
  Query and Ubuntu merge plans for PCI: Accept AtomicOps already enabled
  by the hypervisor

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2172445/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to