All of lore.kernel.org
 help / color / mirror / Atom feed
* Prototyping on CXL hardware
@ 2022-11-22  9:54 Julien BERAUD
  2022-11-22 16:53 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Julien BERAUD @ 2022-11-22  9:54 UTC (permalink / raw)
  To: linux-cxl

Hello Everyone,

I'm currently trying to prototype with a simple use-case on a CXL type 3 device
directly connected to a CXL 2.0 capable server.

Since I have seen many patches being integrated in the mainline kernel, I am 
running a 6.0.1 release.

The init phase of the drivers fails with the following trace:

cxl_mem mem0: at mem0 no parent for dport: pci0000:16

It occurs at the first iteration of the loop in devm_cxl_enumerate_ports 

The previous steps have been succeding as far as I know.

---------------------------------------------------------------------------------
So I have a few questions that I hope someone can answer here, I am sorry if they
sound naive :

- What is supposed to fill the device's ancestry, and what does it means if there
is none ?

- More generally, is a CXL type 3 device directly connected to a CXL capable
server supposed to initialize correctly on a 6.0.1 kernel or should I use a more
advanced branch ?


Thanks in advance for your answers,
Julien

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Prototyping on CXL hardware
  2022-11-22  9:54 Prototyping on CXL hardware Julien BERAUD
@ 2022-11-22 16:53 ` Jonathan Cameron
  2022-11-23  8:39   ` Julien BERAUD
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2022-11-22 16:53 UTC (permalink / raw)
  To: Julien BERAUD; +Cc: linux-cxl, Dan Williams

On Tue, 22 Nov 2022 10:54:52 +0100
Julien BERAUD <jberaud@sasfermat.com> wrote:

> Hello Everyone,
> 

Hi Julien, Nice to 'meet' you.

> I'm currently trying to prototype with a simple use-case on a CXL type 3 device
> directly connected to a CXL 2.0 capable server.
> 
> Since I have seen many patches being integrated in the mainline kernel, I am 
> running a 6.0.1 release.
> 
> The init phase of the drivers fails with the following trace:
> 
> cxl_mem mem0: at mem0 no parent for dport: pci0000:16
> 
> It occurs at the first iteration of the loop in devm_cxl_enumerate_ports 
> 
> The previous steps have been succeding as far as I know.
> 
> ---------------------------------------------------------------------------------
> So I have a few questions that I hope someone can answer here, I am sorry if they
> sound naive :
> 
> - What is supposed to fill the device's ancestry, and what does it means if there
> is none ?
> 
> - More generally, is a CXL type 3 device directly connected to a CXL capable
> server supposed to initialize correctly on a 6.0.1 kernel or should I use a more
> advanced branch ?

To take a lazy punt in the dark as it end of day here.

Do you have an ACPI CEDT table and required ACPI stuff such as ACPI0017 in DSDT?
Otherwise the root of the created CXL topology will be missing - I haven't checked
the code paths, but that might well give the above result.

There are a few fixes you will want on top of 6.0.1 - but those are all around
region creation I think, so you aren't getting that far.
I've not been tracking progress of those. Dan, what's the current status?

For reference you could take a look at the upstream QEMU (very recent needed as we
had a fix going through on x86).  That should work and gives you something to compare
with when bringing up real hardware.

Jonathan

> 
> 
> Thanks in advance for your answers,
> Julien


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Prototyping on CXL hardware
  2022-11-22 16:53 ` Jonathan Cameron
@ 2022-11-23  8:39   ` Julien BERAUD
  0 siblings, 0 replies; 3+ messages in thread
From: Julien BERAUD @ 2022-11-23  8:39 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-cxl, Dan Williams



On 22/11/2022 17:53, Jonathan Cameron wrote:
> On Tue, 22 Nov 2022 10:54:52 +0100
> Julien BERAUD <jberaud@sasfermat.com> wrote:
> 
>> Hello Everyone,
>>
> 
> Hi Julien, Nice to 'meet' you.

Nice to meet you too.

> 
>> I'm currently trying to prototype with a simple use-case on a CXL type 3 device
>> directly connected to a CXL 2.0 capable server.
>>
>> Since I have seen many patches being integrated in the mainline kernel, I am 
>> running a 6.0.1 release.
>>
>> The init phase of the drivers fails with the following trace:
>>
>> cxl_mem mem0: at mem0 no parent for dport: pci0000:16
>>
>> It occurs at the first iteration of the loop in devm_cxl_enumerate_ports 
>>
>> The previous steps have been succeding as far as I know.
>>
>> ---------------------------------------------------------------------------------
>> So I have a few questions that I hope someone can answer here, I am sorry if they
>> sound naive :
>>
>> - What is supposed to fill the device's ancestry, and what does it means if there
>> is none ?
>>
>> - More generally, is a CXL type 3 device directly connected to a CXL capable
>> server supposed to initialize correctly on a 6.0.1 kernel or should I use a more
>> advanced branch ?
> 
> To take a lazy punt in the dark as it end of day here.
> 
> Do you have an ACPI CEDT table and required ACPI stuff such as ACPI0017 in DSDT?
> Otherwise the root of the created CXL topology will be missing - I haven't checked
> the code paths, but that might well give the above result.

Thank you very much, I was kind of suspecting this would be the issue. I'm far from
an expert on ACPI and other firmware related topics and I have to understand what
it implies on the device (we are developing the type 3 device) and possibly on the
host to add the CEDT table and "ACPI0017 in DSDT". So I'm back to my homework here.

> 
> There are a few fixes you will want on top of 6.0.1 - but those are all around
> region creation I think, so you aren't getting that far.
> I've not been tracking progress of those. Dan, what's the current status?
> 
> For reference you could take a look at the upstream QEMU (very recent needed as we
> had a fix going through on x86).  That should work and gives you something to compare
> with when bringing up real hardware.
> 

It is exactly what I am currently trying to do. I'm having trouble finding out the
proper set of options on the master branch or 7.0.1 of qemu but I have been able to
boot with an emulated type 3 device on the (rather old) cxl-2.0v4 on
https://gitlab.com/bwidawsk/qemu.git.
Again I'm back to my homework here, glad to know I'm kind of looking in the right
direction.

> Jonathan
> 
>>
>>
>> Thanks in advance for your answers,
>> Julien
> 

Cheers,
Julien

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-23  8:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-22  9:54 Prototyping on CXL hardware Julien BERAUD
2022-11-22 16:53 ` Jonathan Cameron
2022-11-23  8:39   ` Julien BERAUD

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.