From: Dave Jiang Date: Fri, 3 Apr 2026 19:21:27 +0000 (-0700) Subject: Merge branch 'for-7.1/dax-hmem' into cxl-for-next X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=303d32843b831ba86c28aea188db95da65d88f31;p=thirdparty%2Fkernel%2Fstable.git Merge branch 'for-7.1/dax-hmem' into cxl-for-next The series addresses conflicts between HMEM and CXL when handling Soft Reserved memory ranges. CXL will try best effort in claiming the Soft Reserved memory region that are CXL regions. If fails, it will punt back to HMEM. tools/testing/cxl: Test dax_hmem takeover of CXL regions tools/testing/cxl: Simulate auto-assembly failure dax/hmem: Parent dax_hmem devices dax/hmem: Fix singleton confusion between dax_hmem_work and hmem devices dax/hmem: Reduce visibility of dax_cxl coordination symbols cxl/region: Constify cxl_region_resource_contains() cxl/region: Limit visibility of cxl_region_contains_resource() dax/cxl: Fix HMEM dependencies cxl/region: Fix use-after-free from auto assembly failure dax/hmem, cxl: Defer and resolve Soft Reserved ownership cxl/region: Add helper to check Soft Reserved containment by CXL regions dax: Track all dax_region allocations under a global resource tree dax/cxl, hmem: Initialize hmem early and defer dax_cxl binding dax/hmem: Gate Soft Reserved deferral on DEV_DAX_CXL dax/hmem: Request cxl_acpi and cxl_pci before walking Soft Reserved ranges dax/hmem: Factor HMEM registration into __hmem_register_device() dax/bus: Use dax_region_put() in alloc_dax_region() error path --- 303d32843b831ba86c28aea188db95da65d88f31 diff --cc tools/testing/cxl/test/cxl.c index cd47fdd7ccb51,9a9f52090c1d0..418669927fb00 --- a/tools/testing/cxl/test/cxl.c +++ b/tools/testing/cxl/test/cxl.c @@@ -1129,12 -815,17 +1130,18 @@@ static bool mock_init_hdm_decoder(struc * * See 'cxl list -BMPu -m cxl_mem.0,cxl_mem.4' */ - if (!hb0 || pdev->id % 4 || pdev->id > 4 || cxld->id > 0) { + if (!is_endpoint_decoder(&cxld->dev) || !hb0 || pdev->id % 4 || + pdev->id > 4 || cxld->id > 0) { default_mock_decoder(cxld); - return; + return false; } + /* Simulate missing cxl_mem.4 configuration */ + if (hb0 && pdev->id == 4 && cxld->id == 0 && fail_autoassemble) { + default_mock_decoder(cxld); - return; ++ return false; + } + base = window->base_hpa; if (extended_linear_cache) base += mock_auto_region_size;