[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y12i55jl.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date: Mon, 21 Oct 2024 14:33:18 +0800
From: "Huang, Ying" <ying.huang@...el.com>
To: 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
Dan Williams <dan.j.williams@...el.com> writes:
> 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.
Sorry for confusing. When I said endpoint, I wanted to say "endpoint
decoder" actually. IIUC, the coherence type of region should be same as
that of all endpoint decoders participating the region. If we specify
the coherence type of the endpoint decoders, the coherence type of the
region should be same, so we don't need to specify it again? We need to
check root decoder capability as you pointed out.
Best Regards,
Huang, Ying
Powered by blists - more mailing lists