linux/drivers/cxl
Alison Schofield 2042d11cb5 cxl/trace: Correct DPA field masks for general_media & dram events
The length of Physical Address in General Media and DRAM event
records is 64-bit, so the field mask for extracting the DPA should
be 64-bit also, otherwise the trace event reports DPA's with the
upper 32 bits of a DPA address masked off. If users do DPA-to-HPA
translations this could lead to incorrect page retirement decisions.

Use GENMASK_ULL() for CXL_DPA_MASK to get all the DPA address bits.

Tidy up CXL_DPA_FLAGS_MASK by using GENMASK() to only mask the exact
flag bits.

These bits are defined as part of the event record physical address
descriptions of General Media and DRAM events in CXL Spec 3.1
Section 8.2.9.2 Events.

Fixes: d54a531a43 ("cxl/mem: Trace General Media Event Record")
Co-developed-by: Shiyang Ruan <ruansy.fnst@fujitsu.com>
Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com>
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/2867fc43c57720a4a15a3179431829b8dbd2dc16.1714496730.git.alison.schofield@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2024-04-30 12:24:26 -07:00
..
core cxl/trace: Correct DPA field masks for general_media & dram events 2024-04-30 12:24:26 -07:00
acpi.c cxl: Consolidate dport access_coordinate ->hb_coord and ->sw_coord into ->coord 2024-04-08 08:25:21 -07:00
cxl.h cxl: Consolidate dport access_coordinate ->hb_coord and ->sw_coord into ->coord 2024-04-08 08:25:21 -07:00
cxlmem.h cxl: Consolidate dport access_coordinate ->hb_coord and ->sw_coord into ->coord 2024-04-08 08:25:21 -07:00
cxlpci.h cxl/pci: Get rid of pointer arithmetic reading CDAT table 2024-03-12 23:52:29 -07:00
Kconfig cxl: remove CONFIG_CXL_PMU entry in drivers/cxl/Kconfig 2024-03-27 01:58:34 +09:00
Makefile cxl/pmem: Introduce nvdimm_security_ops with ->get_flags() operation 2022-11-30 16:30:47 -08:00
mem.c cxl: Fix sysfs export of qos_class for memdev 2024-02-16 23:20:34 -08:00
pci.c acpi/ghes: Remove CXL CPER notifications 2024-02-20 22:50:52 -08:00
pmem.c cxl/mbox: Move mailbox related driver state to its own data structure 2023-06-25 14:31:08 -07:00
pmu.h cxl/pci: Find and register CXL PMU devices 2023-05-30 11:20:35 -07:00
port.c cxl: Refactor to use __free() for cxl_root allocation in cxl_endpoint_port_probe() 2024-01-05 14:36:29 -08:00
security.c Merge branch 'for-6.5/cxl-type-2' into for-6.5/cxl 2023-06-25 17:16:51 -07:00