Re: [PATCH v9 07/11] PCI/CXL: Discover the CXL reset scope

From: Dan Williams (nvidia)

Date: Thu Jul 09 2026 - 21:00:31 EST


Srirangan Madhavan wrote:
> Add reset context support to validate that CXL Reset is function-scoped
> before advertising it as a PCI reset method. Use the Non-CXL Function
> Map, ARI/devfn rules, and CXL.cache/mem capability bits to reject reset
> when another same-scope function would also be affected.
>
> If the Function Map cannot be read, warn and conservatively treat all
> candidate same-scope functions as CXL-capable for scope validation.

I was hoping that all the sibling logic could be dropped after the
realization that function scoped reset *must* not affect siblings.

The small corner case of multi-function device, but only function0 is
impacted by CXL Reset can be an add-on patch if someone really needs it,
otherwise just do a simple:

if (dev->multifunction)

...check for now.

It would also be good to fix the bug in cxl_reset_bus_function() with
the same check. That handler currently allows reset for multifunction
devices. Give Alex credit with a Reported-by.