[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6712d0f737037_10a0329441@dwillia2-mobl3.amr.corp.intel.com.notmuch>
Date: Fri, 18 Oct 2024 14:19:51 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: "Huang, Ying" <ying.huang@...el.com>, Dan Williams
<dan.j.williams@...el.com>
CC: Dave Jiang <dave.jiang@...el.com>, <linux-cxl@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Gregory Price <gourry@...rry.net>, "Davidlohr
Bueso" <dave@...olabs.net>, Jonathan Cameron <jonathan.cameron@...wei.com>,
Alison Schofield <alison.schofield@...el.com>, Vishal Verma
<vishal.l.verma@...el.com>, Ira Weiny <ira.weiny@...el.com>, Alejandro Lucero
<alucerop@....com>, Ben Cheatham <benjamin.cheatham@....com>
Subject: Re: [PATCH 4/5] cxl: Set type of region to that of the first endpoint
Huang, Ying wrote:
> Dan Williams <dan.j.williams@...el.com> writes:
>
> > Huang Ying wrote:
>
> [snip]
>
> >> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> >> index 21b877d8582f..d709738ada61 100644
> >> --- a/drivers/cxl/core/region.c
> >> +++ b/drivers/cxl/core/region.c
> >> @@ -1926,7 +1926,10 @@ static int cxl_region_attach(struct cxl_region *cxlr,
> >> return -ENXIO;
> >> }
> >>
> >> - if (cxled->cxld.target_type != cxlr->type) {
> >> + /* Set the type of region to that of the first endpoint */
> >> + if (cxlr->type == CXL_DECODER_INVALID) {
> >> + cxlr->type = cxled->cxld.target_type;
> >> + } else if (cxled->cxld.target_type != cxlr->type) {
> >
> > No, the type of the region is determined by the caller and should be
> > gated by the region capability. For type-2 region creation I doubt
> > userspace is going to be creating those vs the accelerator so this all
> > seems backwards to me.
>
> How do we determine the type of the endpoint? Specify it in type2/type3
> device driver?
Why does the endpoint type matter? Memory expansion can be supported by
HDM-D[B], and an accelerator could have one or more HDM-H decoders.
> If so, we will specify the type of both the endpoint and the region in
> type2/type3 device driver. Then, why not only specify the type of the
> endpoint? The type of region can be determined from the type of the
> endpoint.
Because CXL HDM protocol is per decoder not per device.
Powered by blists - more mailing lists