Re: [RFC PATCH 2/4] PCI/CXL: Populate and insert/remove pdev->coh_resource[]
From: Ankit Agrawal
Date: Tue Oct 20 2026 - 04:46:23 EST
>> +
>> + *res = DEFINE_RES_NAMED_DESC(config->hpa_range.start,
>> + range_len(&config->hpa_range),
>> + "CXL coherent memory",
>> + IORESOURCE_MEM, IORES_DESC_NONE);
>> +
>
> On platforms using Normalized Addressing the Endpoint decoders contain DPA ranges. This
> patch will then record DPA ranges as a result. Translating this requires call to prm_cxl_dpa_spa() ?
> The challenge is the PRM in drivers/cxl/core/atl.c may not be initialized this early.
>
Yeah, good point. On the platforms that I used, the HDM are precommitted
and have HPA. But I agree, the snapshot must not silently record a DPA.
Is there an existing way to tell at this point that the endpoint decoder is
DPA-based? If yes, I intend to fail close with coh_resource[] left unpopulated
Or would you prefer populating lazily until translations are available?
>> + conflict = insert_resource_conflict(&iomem_resource, res);
>> + if (conflict) {
>> + pci_warn(pdev,