All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v9 0/4] cxl: Repair poison enumeration regressions
@ 2026-10-20  5:13 Richard Cheng
  2026-10-20  5:14 ` [PATCH v9 1/4] cxl/region: Scan all partitions for unmapped poison Richard Cheng
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Richard Cheng @ 2026-10-20  5:13 UTC (permalink / raw)
  To: dave, jic23, dave.jiang, alison.schofield, vishal.l.verma, iweiny,
	ming.li
  Cc: gourry, terry.bowman, alucerop, icheng, rrichter, linux-cxl,
	linux-kernel, kobak, kaihengf, newtonl, kristinc

This series repairs four poison enumeration regressions introduced by
commit be5cbd084027 ("cxl: Kill enum cxl_decoder_mode"). This revision
rebases the four patches from v8 [1] onto Linus's v7.3 tag and
incorporates the review feedback.

Patch 1: cxl_get_poison_unmapped() ends the partition walk when it
encounters a fully mapped partition. Continue to the next partition
instead, so unmapped poison in later partitions is still collected.

Patch 2: the unmapped scan tolerates -EFAULT for RAM partitions but
leaves the error in rc. If no later query overwrites rc, enumeration
incorrectly reports failure. Clear rc before continuing past the
tolerated error.

Patch 3: use the ctx->offset handoff from the committed-decoder walk
as the starting point for the unmapped scan. Starting after the highest
DPA allocation leaves ranges allocated to uncommitted decoders
unqueried. Resume at the committed boundary and scan later partitions
from their beginning. Also reset both the partition and offset when
falling back to scanning all partitions, as suggested by Alison.

Patch 4: cxl_get_poison_by_memdev() can overwrite an earlier partition
query failure with a later success. Stop on the first error that is
not already tolerated as a RAM -EFAULT, preserving the failure.
Introduce a shared poison_efault_forgiven() helper in core.h and use
it in the memdev and region poison paths, as suggested by Davidlohr.


Changes since v8 [1]:
- Rebase onto Linus's v7.3 tag
- Keep patches 1 and 2 functionally unchanged
- Patch 3: Reset ctx.offset and ctx.part, suggested by Alison Schofield
- Patch 4: Introduce poison_efault_forgiven(), suggested by
  Davidlohr Bueso.
  The helper was present on v8's base but absent from v7.3

Best regards,
Richard Cheng.


Richard Cheng (4):
  cxl/region: Scan all partitions for unmapped poison
  cxl/region: Don't leak tolerated RAM -EFAULT from unmapped poison scan
  cxl/region: Start unmapped poison scan at the committed decoder
    boundary
  cxl/memdev: Don't overwrite the error from an earlier partition poison
    query

 drivers/cxl/core/core.h   |  9 +++++++++
 drivers/cxl/core/memdev.c |  8 +++-----
 drivers/cxl/core/region.c | 24 ++++++++++++++----------
 3 files changed, 26 insertions(+), 15 deletions(-)


base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-20  8:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20  5:13 [PATCH v9 0/4] cxl: Repair poison enumeration regressions Richard Cheng
2026-10-20  5:14 ` [PATCH v9 1/4] cxl/region: Scan all partitions for unmapped poison Richard Cheng
2026-10-20  5:14 ` [PATCH v9 2/4] cxl/region: Don't leak tolerated RAM -EFAULT from unmapped poison scan Richard Cheng
2026-10-20  5:14 ` [PATCH v9 3/4] cxl/region: Start unmapped poison scan at the committed decoder boundary Richard Cheng
2026-10-20  8:36   ` sashiko-bot
2026-10-20  5:14 ` [PATCH v9 4/4] cxl/memdev: Don't overwrite the error from an earlier partition poison query Richard Cheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.