mbox series

[v2,0/2] cxl: add interleave capability check

Message ID 20240403021747.17260-1-yaoxt.fnst@fujitsu.com
Headers show
Series cxl: add interleave capability check | expand

Message

Xingtao Yao (Fujitsu) April 3, 2024, 2:17 a.m. UTC
Changes:
v1 -> v2:
1. rename interleave_mask to ig_cap_mask
2. add a check for interleave granularity
3. update commit message of PATCH 2

Currently driver does not check the interleave capability of target, it can
attach target to region even if target does not support the interleave
granularity or interleave ways. Thus, applications access the memory
will occur unexpected behavior, such as segmentation fault.

Therefore, it is necessary to check the interleave capability of target
before attaching it to region. If the check fails, the attachment
operation should be stopped.

Yao Xingtao (2):
  cxl/core/hdm: rename interleave_mask to ig_cap_mask
  cxl/core/region: check interleave capability

 drivers/cxl/core/hdm.c    |  8 ++++++--
 drivers/cxl/core/region.c | 37 +++++++++++++++++++++++++++++++++++++
 drivers/cxl/cxl.h         |  2 ++
 drivers/cxl/cxlmem.h      |  3 ++-
 4 files changed, 47 insertions(+), 3 deletions(-)