From: Dan Williams <dan.j.williams@intel.com>
To: Fan Ni <fan.ni@samsung.com>, Dan Williams <dan.j.williams@intel.com>
Cc: "alison.schofield@intel.com" <alison.schofield@intel.com>,
"vishal.l.verma@intel.com" <vishal.l.verma@intel.com>,
"ira.weiny@intel.com" <ira.weiny@intel.com>,
"bwidawsk@kernel.org" <bwidawsk@kernel.org>,
"Jonathan.Cameron@huawei.com" <Jonathan.Cameron@huawei.com>,
"dan.carpenter@oracle.com" <dan.carpenter@oracle.com>,
"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
Adam Manzanares <a.manzanares@samsung.com>,
"dave@stgolabs.net" <dave@stgolabs.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cxl/region: Fix memdev reuse check
Date: Thu, 8 Dec 2022 13:22:04 -0800 [thread overview]
Message-ID: <6392557cc0aeb_3cbe02945b@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <20221207001852.GA2414318@bgt-140510-bm03>
Fan Ni wrote:
> On Mon, Nov 07, 2022 at 03:40:36PM -0800, Dan Williams wrote:
>
> > Fan Ni wrote:
> > > Memdev reuse in a region currently does not iterate over all of the
> > > interleave targets. Fix this by using existing iterator for memdev reuse
> > > check.
> >
> > Not enough detail, what does this actually fix in practice? For example,
> > if an end user encountered this bug, what would they see as the
> > symptoms? I could probably figure out, but for bugs I should not have
> > to, and more importantly downstream OSV kernel maintainers, who do not
> > have the same context as CXL developers, also need that information to
> > decide if this is a fix they want to backport into their kernel.
> >
>
> Hi Dan,
> Thanks for the feedback. Here are more details about the patch, and
> I will refine the patch.
>
> cxlmd_target = cxled_to_memdev(cxled_target);
> if (cxlmd_target == cxlmd) {
> dev_dbg(&cxlr->dev,
> "%s already specified at position %d via: %s\n",
> dev_name(&cxlmd->dev), pos,
> dev_name(&cxled_target->cxld.dev));
> return -EBUSY;
> }
>
> Before the patch, 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."
>
> The CXL specification allows a device to have more than one HDM decoder
> ("The number of decoders implemented by a component are enumerated via the CXL
> HDM Decoder Capability register (see Section 8.2.4.19.1"). If a CXL device
> has multiple HDM decoders the current code allows to create memory regions
> that map multiple HPAs to a single DPA.
>
> Fan
Thanks for this explanation I folded this into the changelog and applied
it for v6.2.
prev parent reply other threads:[~2022-12-08 21:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20221107212232uscas1p20a000834b76db7a7e459708b06638120@uscas1p2.samsung.com>
2022-11-07 21:22 ` Fan Ni
2022-11-07 23:40 ` Dan Williams
2022-12-07 0:19 ` Fan Ni
2022-12-08 21:22 ` Dan Williams [this message]
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=6392557cc0aeb_3cbe02945b@dwillia2-xfh.jf.intel.com.notmuch \
--to=dan.j.williams@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=a.manzanares@samsung.com \
--cc=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=dave@stgolabs.net \
--cc=fan.ni@samsung.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®