Re: [PATCH v12 06/12] cxl: Add CXL Device Reset helper

From: Srirangan Madhavan

Date: Tue Sep 22 2026 - 20:54:59 EST


On 9/15/26 6:56 AM, Lucero Palau, Alejandro wrote:
+    rc = pci_read_config_word(pdev, dvsec + PCI_DVSEC_CXL_CTRL, &ctrl);
+    if (rc)
+            return pcibios_err_to_errno(rc);
+
+    if (!(ctrl & PCI_DVSEC_CXL_CACHE_ENABLE) ||
+        !(ctrl & PCI_DVSEC_CXL_MEM_ENABLE))
+            return -ENOTTY;


Type2 cache support is coming and it could be CXL.cache forced to
disable if IOMMU enabled and the device not supporting ATS nor belonging
to IOMMU identity mapping (Benjamin Cheatham will send this support
soon). In that case, I can not see a reason for not allowing a reset
assuming CXL.mem would be still usable independently of CXL.cache
functionality.

Alejandro,
I forgot to fold this into my earlier reply to Jonathan.
Ack, on the requirement.
But before changing the eligibility check, I would like to confirm whether the existing reset policy around cache invalidation & memory handling otherwise applies unchanged to this configuration.

I left the v13 checks unchanged for now, I'll update based on the pointers.

--
Regards,
Srirangan