diff options
author | Fan Ni <fan.ni@samsung.com> | 2022-11-07 21:22:31 +0000 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2022-12-08 13:03:47 -0800 |
commit | f04facfb993de47e2133b2b842d72b97b1c50162 (patch) | |
tree | b693990ccf51ceb2e4c137fdcfc9b7bf99ada94d /kernel | |
parent | 9b5f77efb0dc71d95403b528756e39b6cae0b948 (diff) |
cxl/region: Fix memdev reuse check
Due to a typo, the check of whether or not a memdev has already been
used as a target for the region (above code piece) will always be
skipped. Given a memdev with more than one HDM decoder, an interleaved
region can be created that maps multiple HPAs to the same DPA. According
to CXL spec 3.0 8.1.3.8.4, "Aliasing (mapping more than one Host
Physical Address (HPA) to a single Device Physical Address) is
forbidden."
Fix this by using existing iterator for memdev reuse check.
Cc: <stable@vger.kernel.org>
Fixes: 384e624bb211 ("cxl/region: Attach endpoint decoders")
Signed-off-by: Fan Ni <fan.ni@samsung.com>
Link: https://lore.kernel.org/r/20221107212153.745993-1-fan.ni@samsung.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions