Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cxl: Adjust offset calculation for poison injection

The HPA to DPA translation for poison injection assumes that the
base address starts from where the CXL region begins. When the
extended linear cache is active, the offset can be within the DRAM
region. Adjust the offset so that it correctly reflects the offset
within the CXL region.

[ dj: Add fixes tag from Alison ]

Fixes: c3dd67681c70 ("cxl/region: Add inject and clear poison by region offset")
Link: https://patch.msgid.link/20251031173224.3537030-5-dave.jiang@intel.com
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>

+2
+2
drivers/cxl/core/region.c
··· 3702 3702 if (validate_region_offset(cxlr, offset)) 3703 3703 return -EINVAL; 3704 3704 3705 + offset -= cxlr->params.cache_size; 3705 3706 rc = region_offset_to_dpa_result(cxlr, offset, &result); 3706 3707 if (rc || !result.cxlmd || result.dpa == ULLONG_MAX) { 3707 3708 dev_dbg(&cxlr->dev, ··· 3735 3734 if (validate_region_offset(cxlr, offset)) 3736 3735 return -EINVAL; 3737 3736 3737 + offset -= cxlr->params.cache_size; 3738 3738 rc = region_offset_to_dpa_result(cxlr, offset, &result); 3739 3739 if (rc || !result.cxlmd || result.dpa == ULLONG_MAX) { 3740 3740 dev_dbg(&cxlr->dev,