From: Alejandro Lucero Palau <alucerop@amd.com>
To: PJ Waskiewicz <ppwaskie@kernel.org>,
alejandro.lucero-palau@amd.com, linux-cxl@vger.kernel.org,
netdev@vger.kernel.org, dan.j.williams@intel.com,
edward.cree@amd.com, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, edumazet@google.com, dave.jiang@intel.com
Subject: Re: [PATCH v17 00/22] Type2 device basic support
Date: Mon, 8 Sep 2025 12:48:28 +0100 [thread overview]
Message-ID: <8aaeef56-a1fb-4bbd-a2ff-45a4464d6e48@amd.com> (raw)
In-Reply-To: <44898314e457669a80ccb08976813161d8cd9eb1.camel@kernel.org>
On 9/4/25 18:48, PJ Waskiewicz wrote:
> Hi Alejandro,
>
> Apologies for the late reply. Totally lost the reply during the US
> holiday...
No Worries!
> On Thu, 2025-08-28 at 09:02 +0100, Alejandro Lucero Palau wrote:
>> Hi PJ,
>>
>> On 8/27/25 17:48, PJ Waskiewicz wrote:
>>> On Tue, 2025-06-24 at 15:13 +0100, alejandro.lucero-palau@amd.com
>>> wrote:
>>>
>>> Hi Alejandro,
>>>
>>>> From: Alejandro Lucero <alucerop@amd.com>
>>>>
>>>> v17 changes: (Dan Williams review)
>>>> - use devm for cxl_dev_state allocation
>>>> - using current cxl struct for checking capability registers
>>>> found
>>>> by
>>>> the driver.
>>>> - simplify dpa initialization without a mailbox not supporting
>>>> pmem
>>>> - add cxl_acquire_endpoint for protection during initialization
>>>> - add callback/action to cxl_create_region for a driver
>>>> notified
>>>> about cxl
>>>> core kernel modules removal.
>>>> - add sfc function to disable CXL-based PIO buffers if such a
>>>> callback
>>>> is invoked.
>>>> - Always manage a Type2 created region as private not allowing
>>>> DAX.
>>>>
>>> I've been following the patches here since your initial RFC. What
>>> platform are you testing these on out of curiosity?
>>
>> Most of the work was done with qemu. Nowadays, I have several system
>> with CXL support and Type2 BIOS support, so it has been successfully
>> tested there as well.
> I also have a number of systems with Type2 support enabled in the BIOS,
> spread between multiple uarch versions of Intel and AMD (EMR/GNR,
> Genoa/Turin).
>
>>> I've tried pulling the v16 patches into my test environment, and on
>>> CXL
>>> 2.0 hosts that I have access to, the patches did not work when
>>> trying
>>> to hook up a Type 2 device. Most of it centered around many of the
>>> CXL
>>> host registers you try poking not existing.
>>
>> Can you share the system logs and maybe run it with CXL debugging on?
> What system logs are you referring to? dmesg? Also what CXL
> debugging? Just enabling the dev_dbg() paths for the CXL modules?
>
>>> I do have CXL-capable BIOS
>>> firmware on these hosts, but I'm questioning that either there's
>>> still
>>> missing firmware, or the patches are trying to touch something that
>>> doesn't exist.
>>
>> May I ask which system are you using? ARM/Intel/AMD/surpriseme? lspci
>> -vvv output would also be useful. I did find some issues with how the
>> BIOS we got is doing things, something I will share and work on if
>> that
>> turns out to be a valid case and not a BIOS problem.
> I've been lately testing on an Intel GNR and an AMD Turin. Let's just
> say we can focus on the CRB's from both of them, so I have BIOS's
> directly from the CPU vendors (there are other OEM vendors in the mix,
> same results, but we'll leave them out for now).
>
> We have our Type2 device that successfully links/trains CXL protocols
> (all of them), and have been working for some time on previous gen's as
> well (SPR/EMR/Genoa). I can't share the full output of lspci due to
> this being a proprietary device, but link caps show the .mem and other
> protocols fully linked/trained. I also have the .mem acceleration
> region mapped currently by our drivers directly.
Just for being sure, you are mmaping the CXL range assigned by the BIOS
to your device. Right?
>
> What I'm running into is very early in the driver bringup when
> migrating to the new API you have presented with the refactors of the
> CXL core. In my driver's .probe() function (assume this is a pci_dev),
> I have the following beginning flow:
>
> - pci_find_dvsec_capability() (returns the correct field pointer)
> - cxl_dev_state_create(..., CXL_DEVTYPE_DEVMEM, ...) - succeeds
> - cxl_pci_accel_setup_regs() - fails to detect accelerated registers
> - cxl_mem_dpa_init()
> - cxl_dpa_setup() - returns failure
It is hard to follow these calls when using v16. But your next email is,
I think, more interesting. Anyways, if you can use v17, it could help
for focusing on a specific version.
>
> This is where the wheels have already flown off. Note that this is
> with the V16 patches, so I'm not sure if there was something resolved
> between those and the V17 patches. I'm working right now on geting the
> V17 patches running on my Purico Turin box. But if there's a specific
> BIOS I would need to target for the Purico CRB, that would be useful
> information to have as well. My Purico box is running BIOS Revision
> 5.33.
>
No, there is no fix in v17.
About lspci output, as you can not put it all, could you tell what is
the CXL range assigned to the CXL Root bridge and the range assigned to
your device in those systems you did try? I'm saying so because I think
you will run into another problem later on with AMD systems, once you
hopefully solve the one making the current initialization to fail.
Thanks
>>> I'm working on rebasing to the v17 patches to see if this resolves
>>> what
>>> I'm seeing. But it's a bit of a lift, so I figured I'd ask what
>>> you're
>>> testing on before burning more time.
>>>
>>> Eventually I'd like to either give a Tested-by or shoot back some
>>> amended patches based on testing. But I've not been able to get
>>> that
>>> far yet...
>>
>> That would be really good. Let's see if we can figure out what is the
>> problem there.
> Sounds like a plan to me. Thanks for doing the heavy lifting here on
> these patches.
>
> Cheers,
> -PJ
next prev parent reply other threads:[~2025-09-08 11:48 UTC|newest]
Thread overview: 115+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 14:13 [PATCH v17 00/22] Type2 device basic support alejandro.lucero-palau
2025-06-24 14:13 ` [PATCH v17 01/22] cxl: Add type2 " alejandro.lucero-palau
2025-06-25 14:06 ` Jonathan Cameron
2025-06-30 14:38 ` Alejandro Lucero Palau
2025-07-25 21:46 ` dan.j.williams
2025-08-05 10:45 ` Alejandro Lucero Palau
2025-08-05 15:14 ` Dave Jiang
2025-06-24 14:13 ` [PATCH v17 02/22] sfc: add cxl support alejandro.lucero-palau
2025-06-25 16:37 ` Jonathan Cameron
2025-06-30 14:52 ` Alejandro Lucero Palau
2025-06-30 14:55 ` Alejandro Lucero Palau
2025-06-30 16:07 ` Jonathan Cameron
2025-07-25 22:16 ` dan.j.williams
2025-08-06 8:37 ` Alejandro Lucero Palau
2025-06-24 14:13 ` [PATCH v17 03/22] cxl: Move pci generic code alejandro.lucero-palau
2025-07-25 22:41 ` dan.j.williams
2025-08-06 8:46 ` Alejandro Lucero Palau
2025-08-06 9:31 ` Alejandro Lucero Palau
2025-06-24 14:13 ` [PATCH v17 04/22] cxl: allow Type2 drivers to map cxl component regs alejandro.lucero-palau
2025-06-27 8:27 ` Jonathan Cameron
2025-07-25 22:55 ` dan.j.williams
2025-07-28 16:23 ` Dave Jiang
2025-08-06 9:43 ` Alejandro Lucero Palau
2025-08-06 9:41 ` Alejandro Lucero Palau
2025-06-24 14:13 ` [PATCH v17 05/22] sfc: setup cxl component regs and set media ready alejandro.lucero-palau
2025-06-27 8:39 ` Jonathan Cameron
2025-06-30 15:57 ` Alejandro Lucero Palau
2025-08-08 13:11 ` Alejandro Lucero Palau
2025-06-27 8:45 ` Jonathan Cameron
2025-08-08 13:14 ` Alejandro Lucero Palau
2025-07-25 23:04 ` dan.j.williams
2025-06-24 14:13 ` [PATCH v17 06/22] cxl: Support dpa initialization without a mailbox alejandro.lucero-palau
2025-06-27 8:42 ` Jonathan Cameron
2025-06-27 16:43 ` Dave Jiang
2025-07-01 15:23 ` Alejandro Lucero Palau
2025-06-27 8:43 ` Jonathan Cameron
2025-07-01 15:25 ` Alejandro Lucero Palau
2025-07-26 0:54 ` dan.j.williams
2025-06-24 14:13 ` [PATCH v17 07/22] sfc: initialize dpa alejandro.lucero-palau
2025-07-26 0:55 ` dan.j.williams
2025-08-08 16:59 ` Alejandro Lucero Palau
2025-06-24 14:13 ` [PATCH v17 08/22] cxl: Prepare memdev creation for type2 alejandro.lucero-palau
2025-07-26 1:05 ` dan.j.williams
2025-08-08 17:01 ` Alejandro Lucero Palau
2025-06-24 14:13 ` [PATCH v17 09/22] sfc: create type2 cxl memdev alejandro.lucero-palau
2025-06-27 8:51 ` Jonathan Cameron
2025-07-01 15:30 ` Alejandro Lucero Palau
2025-06-24 14:13 ` [PATCH v17 10/22] cx/memdev: Indicate probe deferral alejandro.lucero-palau
2025-06-27 8:59 ` Jonathan Cameron
2025-06-27 9:42 ` Jonathan Cameron
2025-07-01 15:30 ` Alejandro Lucero Palau
2025-06-27 18:17 ` Dave Jiang
2025-06-30 16:20 ` Jonathan Cameron
2025-07-01 16:07 ` Alejandro Lucero Palau
2025-07-01 16:25 ` Dave Jiang
2025-07-01 16:44 ` Jonathan Cameron
2025-07-01 16:02 ` Alejandro Lucero Palau
2025-07-28 17:45 ` dan.j.williams
2025-07-30 3:46 ` dan.j.williams
2025-08-09 11:24 ` Alejandro Lucero Palau
2025-07-16 22:52 ` Dave Jiang
2025-06-24 14:13 ` [PATCH v17 11/22] cxl: Define a driver interface for HPA free space enumeration alejandro.lucero-palau
2025-06-27 22:42 ` Dave Jiang
2025-07-04 14:45 ` Alejandro Lucero Palau
2025-08-05 16:14 ` dan.j.williams
2025-08-11 12:04 ` Alejandro Lucero Palau
2025-06-24 14:13 ` [PATCH v17 12/22] sfc: get endpoint decoder alejandro.lucero-palau
2025-06-27 9:10 ` Jonathan Cameron
2025-07-04 14:51 ` Alejandro Lucero Palau
2025-07-28 16:30 ` dan.j.williams
2025-08-11 14:24 ` Alejandro Lucero Palau
2025-09-02 7:11 ` Alejandro Lucero Palau
2025-06-24 14:13 ` [PATCH v17 13/22] cxl: Define a driver interface for DPA allocation alejandro.lucero-palau
2025-06-27 9:06 ` Jonathan Cameron
2025-07-04 15:18 ` Alejandro Lucero Palau
2025-06-27 20:46 ` Dave Jiang
2025-07-04 15:21 ` Alejandro Lucero Palau
2025-06-24 14:13 ` [PATCH v17 14/22] sfc: get endpoint decoder alejandro.lucero-palau
2025-06-27 9:11 ` Jonathan Cameron
2025-07-07 11:24 ` Alejandro Lucero Palau
2025-07-16 23:48 ` Dave Jiang
2025-06-24 14:13 ` [PATCH v17 15/22] cxl: Make region type based on endpoint type alejandro.lucero-palau
2025-09-03 17:20 ` Davidlohr Bueso
2025-06-24 14:13 ` [PATCH v17 16/22] cxl/region: Factor out interleave ways setup alejandro.lucero-palau
2025-06-27 9:13 ` Jonathan Cameron
2025-06-27 23:05 ` Dave Jiang
2025-06-30 16:20 ` Jonathan Cameron
2025-06-30 16:34 ` Dave Jiang
2025-06-24 14:13 ` [PATCH v17 17/22] cxl/region: Factor out interleave granularity setup alejandro.lucero-palau
2025-06-24 14:13 ` [PATCH v17 18/22] cxl: Allow region creation by type2 drivers alejandro.lucero-palau
2025-06-27 9:32 ` Jonathan Cameron
2025-07-07 11:31 ` Alejandro Lucero Palau
2025-08-05 16:33 ` dan.j.williams
2025-08-11 14:45 ` Alejandro Lucero Palau
2025-06-24 14:13 ` [PATCH v17 19/22] cxl: Avoid dax creation for accelerators alejandro.lucero-palau
2025-06-27 9:33 ` Jonathan Cameron
2025-09-03 17:24 ` Davidlohr Bueso
2025-06-24 14:13 ` [PATCH v17 20/22] sfc: create cxl region alejandro.lucero-palau
2025-06-27 9:38 ` Jonathan Cameron
2025-07-07 11:37 ` Alejandro Lucero Palau
2025-07-28 16:20 ` dan.j.williams
2025-08-11 14:38 ` Alejandro Lucero Palau
2025-06-24 14:13 ` [PATCH v17 21/22] cxl: Add function for obtaining region range alejandro.lucero-palau
2025-06-24 14:13 ` [PATCH v17 22/22] sfc: support pio mapping based on cxl alejandro.lucero-palau
2025-06-27 9:46 ` Jonathan Cameron
2025-07-07 12:06 ` Alejandro Lucero Palau
2025-08-27 17:26 ` ALOK TIWARI
2025-07-25 20:51 ` [PATCH v17 00/22] Type2 device basic support dan.j.williams
2025-07-25 21:11 ` dan.j.williams
2025-08-27 16:48 ` PJ Waskiewicz
2025-08-28 8:02 ` Alejandro Lucero Palau
2025-09-04 17:48 ` PJ Waskiewicz
2025-09-08 11:48 ` Alejandro Lucero Palau [this message]
2025-09-05 23:23 ` PJ Waskiewicz
2025-09-08 12:03 ` Alejandro Lucero Palau
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=8aaeef56-a1fb-4bbd-a2ff-45a4464d6e48@amd.com \
--to=alucerop@amd.com \
--cc=alejandro.lucero-palau@amd.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=edward.cree@amd.com \
--cc=kuba@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ppwaskie@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).