]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
tools/testing/cxl: Test dax_hmem takeover of CXL regions
authorDan Williams <dan.j.williams@intel.com>
Fri, 27 Mar 2026 05:28:21 +0000 (22:28 -0700)
committerDave Jiang <dave.jiang@intel.com>
Wed, 1 Apr 2026 15:12:18 +0000 (08:12 -0700)
commit549b5c12ef06441dbde4718f16e23c547f5592d7
treed6bbe7d9537d9cc2460a30451d4d57b47eec9e86
parent78b8f1a7a4ab39cecd926d50627db3537e0f2ee9
tools/testing/cxl: Test dax_hmem takeover of CXL regions

When platform firmware is committed to publishing EFI_CONVENTIONAL_MEMORY
in the memory map, but CXL fails to assemble the region, dax_hmem can
attempt to attach a dax device to the memory range.

Take advantage of the new ability to support multiple "hmem_platform"
devices, and to enable regression testing of several scenarios:

* CXL correctly assembles a region, check dax_hmem fails to attach dax
* CXL fails to assemble a region, check dax_hmem successfully attaches dax
* Check that loading the dax_cxl driver loads the dax_hmem driver
* Attempt to race cxl_mock_mem async probe vs dax_hmem probe flushing.
  Check that both positive and negative cases.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Tested-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20260327052821.440749-10-dan.j.williams@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
tools/testing/cxl/Kbuild
tools/testing/cxl/test/Kbuild
tools/testing/cxl/test/cxl.c
tools/testing/cxl/test/hmem_test.c [new file with mode: 0644]
tools/testing/cxl/test/mem.c
tools/testing/cxl/test/mock.c
tools/testing/cxl/test/mock.h