Public bug reported:

Backports the upstream 8-patch series **"iommu: Fix
`pci_dev_reset_iommu_prepare/done()`"** (v8) onto `26.04_linux-nvidia-
bos` (NV kernel 7.0). This fixes a failure where a **CXL bus reset**
(`cxl_bus` reset method) aborts with `EBUSY` and emits a WARN from
`pci_dev_reset_iommu_prepare()`.

Root cause:

cxl_reset_bus_function() calls pci_reset_bus_function() internally, and
both call pci_dev_reset_iommu_prepare/done(), producing a nested (re-
entrant) call:

cxl_reset_bus_function():
    pci_dev_reset_iommu_prepare();      // outer
    pci_reset_bus_function():
        pci_dev_reset_iommu_prepare();  // inner (re-entry)
        ...
        pci_dev_reset_iommu_done();     // inner
    pci_dev_reset_iommu_done();         // outer


pci_dev_reset_iommu_prepare() did not allow re-entry, so the inner call warns 
and returns -EBUSY. The same nesting exists across most of 
pci_dev_specific_reset() (which call pcie_flr()). This is the exact issue 
described upstream:

Original posting: 
https://lore.kernel.org/all/[email protected]/
Merged v8 cover: 
https://lore.kernel.org/all/[email protected]/

The reworked series makes the prepare/done bookkeeping per-group_device
and re-entrant, and fixes several related corner cases (nested
callbacks, multi-device groups, PASID attach, ATS invalidation timeouts,
and a UAF/WARN on concurrent detach).

** Affects: linux-nvidia-bos (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/2159852

Title:
  Backport iommu: Fix pci_dev_reset_iommu_prepare/done()

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


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

Reply via email to