Re: [PATCH v17 00/19] PCI/CXL: Add CXL reset support for Type 2 devices
From: Srirangan Madhavan
Date: Sat Dec 05 2026 - 03:02:33 EST
On 11/20/26 3:28 PM, Dave Jiang wrote:
Hi Dave,With this,
- If a region gets torn down mid-reset, the cache is already refreshed
(cxl_hdm_cache_refresh_decoder()), so restore just re-reads it with
cxl_hdm_cache_copy_decoders(). Patch 17 had that call, and patch 18
dropped it when I moved the lock into prepare.
- A new commit mid-reset gets -EBUSY. Regions committed before the reset
shouldn't be able to come online, since the exclusive
request_mem_region() makes the kmem and pmem claims fail, as far as I
can tell.
I think the direction looks good.
v18 is out. It follows the plan with two changes, both adding a
short window rather than holding the lock longer:
- reset_pending is cleared after the second host cache flush instead of
in the restore window, so no decoder of the device commits before that
flush is done.
- A new window sets regs_offline right before the reset starts, so a
region teardown during the reset only updates the software state and
the cache and doesn't touch the registers of a device in reset.
https://lore.kernel.org/linux-cxl/20261205041453.3946529-1-smadhavan@xxxxxxxxxx/
Please let me know if this works. Thank you.
--
Regards,
Srirangan