]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cxl/events: Add extra validity checks for CVME count in DRAM Event Record
authorShiju Jose <shiju.jose@huawei.com>
Thu, 17 Jul 2025 10:18:16 +0000 (11:18 +0100)
committerDave Jiang <dave.jiang@intel.com>
Fri, 18 Jul 2025 15:19:56 +0000 (08:19 -0700)
commitd8145bb8af5c09d27c4dde4f4030d589771594d1
tree435fbf018449d2160faab239017e7c2e1fadd4c2
parentcd3b36cfc659306456d3cf3714c8856307693c01
cxl/events: Add extra validity checks for CVME count in DRAM Event Record

According to the CXL Specification Revision 3.2, Section 8.2.10.2.1.2,
Table 8-58 (DRAM Event Record), the CVME (Corrected Volatile Memory Error)
Count field is valid under the following conditions:
1. The Threshold Event bit is set in the Memory Event Descriptor field,
and
2. The CVME Count must be greater than 0 for events where the Advanced
Programmable Threshold Counter has expired.

Additionally, if the Advanced Programmable Corrected Memory Error Counter
Expire bit in the Memory Event Type field is set, then the Threshold Event
bit in the Memory Event Descriptor field shall also be set.

Add validity checks for the above conditions while reporting the event to
the userspace.

Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Link: https://patch.msgid.link/20250717101817.2104-4-shiju.jose@huawei.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/mbox.c
drivers/cxl/core/trace.h