[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250213064008.4032730-1-wangyuquan1236@phytium.com.cn>
Date: Thu, 13 Feb 2025 14:40:07 +0800
From: Yuquan Wang <wangyuquan1236@...tium.com.cn>
To: dave@...olabs.net,
jonathan.cameron@...wei.com,
dave.jiang@...el.com,
alison.schofield@...el.com,
vishal.l.verma@...el.com,
ira.weiny@...el.com,
dan.j.williams@...el.com
Cc: linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org,
Yuquan Wang <wangyuquan1236@...tium.com.cn>
Subject: [PATCH 0/1] cxl/pmem: debug invalid serial number data
Background
==========
In Qemu environment, the default serial number of cxl-type3 device
is UI64_NULL. But we could still use it to create a nvdimm pmem region
and set a non-zero cookie of nd_interleave_set, for example:
1. create a cxl pmem region interleaved with 2 devices (one with
serial number 0 and the other with serial number 1), and the cookie
would be non-zero/valid.
2. create the second cxl pmem region by 1 device with no serial number
and this region would have a non-zero cookie because the offset of
dpa is non-zero.
Problem
=======
In a nvdimm interleave-set each device with an invalid or zero
serial number may cause pmem region initialization to fail, but in
cxl case such device could still set cookies of nd_interleave_set
and create a nvdimm pmem region.
CXL Pmem Validation
===================
This patch adds the validation of serial number in cxl pmem region creation.
The event of no serial number would cause to fail to set the cookie
and pmem region.
Yuquan Wang (1):
cxl/pmem: debug invalid serial number data
drivers/cxl/pmem.c | 7 +++++++
1 file changed, 7 insertions(+)
--
2.34.1
Powered by blists - more mailing lists