Linux CXL
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: sashiko-bot@kernel.org
Cc: sashiko-reviews@lists.linux.dev,
	"Anisa Su" <anisa.su887@gmail.com>,
	nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org
Subject: Re: [PATCH v12 3/8] cxl/cdat: Gather DSMAS data for DCD partitions
Date: Tue, 4 Aug 2026 01:07:48 +0100	[thread overview]
Message-ID: <20260804010748.7f9f8174@jic23-huawei> (raw)
In-Reply-To: <20260731090250.0C8DE1F000E9@smtp.kernel.org>

On Fri, 31 Jul 2026 09:02:49 +0000
sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [Medium] The commit message claims to extract and store the 'read only' attribute from DSMAS tables, but this logic is completely missing from the code.

Given it will make a lot of difference to a user if they think they have writeable
memory that isn't - I think we probably do want to have readonly here.

> [ ... ]
> > @@ -266,15 +268,26 @@ static void cxl_memdev_set_qos_class(struct cxl_dev_state *cxlds,
> >  		bool found = false;
> >  
> >  		for (int i = 0; i < cxlds->nr_partitions; i++) {
> > +			enum cxl_partition_mode mode = cxlds->part[i].mode;
> >  			struct resource *res = &cxlds->part[i].res;
> > +			u8 handle = cxlds->part[i].handle;
> >  			struct range range = {
> >  				.start = res->start,
> >  				.end = res->end,
> >  			};
> >  
> >  			if (range_contains(&range, &dent->dpa_range)) {
> > +				if (mode == CXL_PARTMODE_DYNAMIC_RAM_1 &&
> > +				    dent->handle != handle) {
> > +					dev_warn(dev,
> > +						 "Dynamic RAM perf mismatch; %pra (%u) vs %pra (%u)\n",
> > +						 &range, handle, &dent->dpa_range,
> > +						 dent->handle);
> > +					continue;
> > +				}  
> 
> [Severity: Medium]
> Could this trigger spurious warnings on valid hardware configurations?
> 
> The CDAT specification allows overlapping DSMAS ranges with different handles
> to support multiple memory types or sharing characteristics for the same DPA
> space. 

Huh?  Where did it get that from.  I'm 99% sure you can't have overlapping
DSMAS entries for the same DPA space.

> 
> If a compliant device provides multiple valid DSMAS entries that overlap
> the partition's range but have different handles, won't iterating over them 
> incorrectly flag the unselected ones as a perf mismatch?
> 

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

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31  8:48 [PATCH v12 0/8] DCD Prep Series Anisa Su
2026-07-31  8:48 ` [PATCH v12 1/8] cxl/mbox: Flag support for Dynamic Capacity Devices (DCD) Anisa Su
2026-08-03 18:03   ` Dave Jiang
2026-08-03 21:30   ` Alison Schofield
2026-08-03 23:12     ` Jonathan Cameron
2026-08-04 15:45       ` Gregory Price
2026-08-04 15:45   ` Gregory Price
2026-08-04 18:10     ` Anisa Su
2026-08-04 16:55   ` Alison Schofield
2026-08-04 18:13     ` Anisa Su
2026-07-31  8:48 ` [PATCH v12 2/8] cxl/mem: Read dynamic capacity configuration from the device Anisa Su
2026-07-31  9:01   ` sashiko-bot
2026-08-04 20:30     ` Anisa Su
2026-08-03 21:52   ` Alison Schofield
2026-08-04  9:12     ` Anisa Su
2026-08-04 16:00       ` Gregory Price
     [not found]   ` <anBkfosW9jKyOIr1@MWDK4CY14F>
2026-08-03 22:11     ` Anisa Su
2026-08-03 23:55   ` Jonathan Cameron
2026-08-04  9:54     ` Anisa Su
2026-07-31  8:48 ` [PATCH v12 3/8] cxl/cdat: Gather DSMAS data for DCD partitions Anisa Su
2026-07-31  9:02   ` sashiko-bot
2026-08-04  0:07     ` Jonathan Cameron [this message]
2026-08-05  8:30       ` Anisa Su
2026-08-03 22:56   ` Alison Schofield
2026-08-05  6:58     ` Anisa Su
2026-07-31  8:48 ` [PATCH v12 4/8] cxl/events: Split event msgnum configuration from irq setup Anisa Su
2026-08-03 23:01   ` Alison Schofield
2026-07-31  8:48 ` [PATCH v12 5/8] cxl/pci: Factor out interrupt policy check Anisa Su
2026-08-03 23:55   ` Alison Schofield
2026-07-31  8:48 ` [PATCH v12 6/8] cxl/mem: Configure dynamic capacity interrupts Anisa Su
2026-07-31  9:04   ` sashiko-bot
2026-08-01  9:30     ` Anisa Su
2026-08-04  0:25       ` Alison Schofield
2026-08-04  0:13   ` Jonathan Cameron
2026-08-04  0:34   ` Alison Schofield
2026-07-31  8:48 ` [PATCH v12 7/8] cxl/core: Return endpoint decoder information from region search Anisa Su
2026-07-31  9:01   ` sashiko-bot
2026-08-04  1:02   ` Alison Schofield
2026-07-31  8:48 ` [PATCH v12 8/8] cxl/core: Enforce partition order/simplify partition calls Anisa Su
2026-08-04  0:16   ` Jonathan Cameron
2026-08-04  1:37   ` 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=20260804010748.7f9f8174@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=anisa.su887@gmail.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    --cc=sashiko-bot@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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