Linux CXL
 help / color / mirror / Atom feed
From: Alison Schofield <alison.schofield@intel.com>
To: Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jic23@kernel.org>,
	Dave Jiang <dave.jiang@intel.com>,
	Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <iweiny@kernel.org>, Li Ming <ming.li@zohomail.com>
Cc: linux-cxl@vger.kernel.org, Srirangan Madhavan <smadhavan@nvidia.com>
Subject: [PATCH v5 0/4] Harden HDM decoder enumeration
Date: Fri,  7 Aug 2026 17:05:47 -0700	[thread overview]
Message-ID: <cover.1786143520.git.alison.schofield@intel.com> (raw)

Changes in v5:
Drop P2 of v4 as it changed what user sees in iw and ig attributes (Davidlohr)
Renumbering: v4 P3 and P4 are now P2 and P3
P1: Validate the target count once per port, not per decoder (Jonathan)
P1: Move the zero-target reject back to cxl_switch_decoder_init() (Ming)
P1: Drop the ways reset for uncommitted decoders (Jonathan, Davidlohr)
P1: Declare cxlsd on one line (Jonathan)
P1: Reword the CXL_HDM_DECODER0_TL_TARGETS comment (Jonathan)
P2: Build the target IDs with put_unaligned_le32() (Jonathan)
P2: Dropped all the tags on endian-ness patch
P3: Commit log s/none committed/uncommitted/ (DaveJ)
P4: New - bound switch decoder target array walks by nr_targets

Changes in v4:
A new patch was inserted as Patch2, so now set is 4 patches.
   Sashiko is likely to complain in Patch 1 for something fixed in
   Patches 2 and 3, but reordering does not makes sense.
P2: Only interpret interleave settings on committed decoders (Ming)
    This is the newly inserted patch
P4: Register reset w devm_add_action (Ming)
P4: Fix up a kernel-doc comment issue (lkp)

Changes in v3:
P1: Move zero-target reject to init_hdm_decoder() (RichardC)
P3: Reset commit_end via a devres action after decoder teardown (RichardC)

Changes in v2:
P1: Handle uncommitted decoders (Sashiko)
P1: Reject switch decoders with zero targets (Sashiko)
P1: Add in code comment clarifying target_count (Sashiko)
P1: Update commit log
P3: Reset commit_end on the failure path only (Sashiko)
P3: Update commit log
P2: No


This set started as Sashiko reported cleanups. The patch added at v4 on
Li Ming's review is dropped in v5. Davidlohr pointed out that it changes
what interleave_ways and interleave_granularity report for an uncommitted
decoder, and those are documented ABI. That is also the answer to Ming's
v3 question that prompted the patch -  enumeration decodes those fields
because userspace reads them, not because the driver needs them.

Only the first patch includes a link to the original Sashiko complaint,
since the others did not originally appear on Lore for me to add public
links.

Srirangan: I believe some of these patches address pre-existing issues
Sashiko posted in reply to your reset series, but frankly, with the
renumbering here, and the respin of your series, I no longer have 
the exact patch to patch correlation.
Alison Schofield (4):
  cxl/hdm: Reject switch decoder interleave ways that overflow targets
  cxl/hdm: Make switch decoder target parsing endian-safe
  cxl/hdm: Restore commit_end when decoder enumeration fails
  cxl/port: Bound switch decoder target array access by nr_targets

 drivers/cxl/core/hdm.c  | 62 +++++++++++++++++++++++++++++++++--------
 drivers/cxl/core/port.c | 27 ++++++++++++------
 drivers/cxl/cxl.h       |  2 ++
 3 files changed, 72 insertions(+), 19 deletions(-)


base-commit: 075b74841bd0065a3bda3440873c747938e69b68
-- 
2.37.3


             reply	other threads:[~2026-08-08  0:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-08  0:05 Alison Schofield [this message]
2026-08-08  0:05 ` [PATCH v5 1/4] cxl/hdm: Reject switch decoder interleave ways that overflow targets Alison Schofield
2026-08-08  0:17   ` sashiko-bot
2026-08-08  0:36     ` Alison Schofield
2026-08-08  5:50   ` Li Ming
2026-08-08  0:05 ` [PATCH v5 2/4] cxl/hdm: Make switch decoder target parsing endian-safe Alison Schofield
2026-08-08  5:51   ` Li Ming
2026-08-08  0:05 ` [PATCH v5 3/4] cxl/hdm: Restore commit_end when decoder enumeration fails Alison Schofield
2026-08-08  0:05 ` [PATCH v5 4/4] cxl/port: Bound switch decoder target array access by nr_targets Alison Schofield
2026-08-08  5:52   ` Li Ming
2026-09-04 23:30 ` [PATCH v5 0/4] Harden HDM decoder enumeration Alison Schofield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1786143520.git.alison.schofield@intel.com \
    --to=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=iweiny@kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=ming.li@zohomail.com \
    --cc=smadhavan@nvidia.com \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox