public inbox for linux-cxl@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Lucero Palau <alucerop@amd.com>
To: Dan Williams <djbw@kernel.org>,
	Dan Williams <dan.j.williams@intel.com>,
	dave.jiang@intel.com
Cc: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org,
	alejandro.lucero-palau@amd.com
Subject: Re: [RFC PATCH 4/4] cxl/region: Introduce cxl_memdev_attach_region
Date: Wed, 15 Apr 2026 13:57:11 +0100	[thread overview]
Message-ID: <b2a780eb-4e62-4fde-9af7-8b2410a98187@amd.com> (raw)
In-Reply-To: <b592580e-da0f-41fe-9ac5-d8dcec8fc6d8@amd.com>


On 4/14/26 16:41, Alejandro Lucero Palau wrote:

<snip>
>
> Also, if the cxl_mem unbinding happens after the type2 driver has 
> invoked ioremap, the driver will be using something it should not. 
> Won't it? I do not think that is correct and the type2 driver should 
> somehow get a notification for stopping using such a range, some sort 
> of detach function the cxl core can invoke. That is something I 
> unsuccessfully tried to add in the past:
>
>
> https://lore.kernel.org/linux-cxl/20250624141355.269056-19-alejandro.lucero-palau@amd.com/ 
>
>
>

FWIW, in that v17 I add the callback function in here:


https://lore.kernel.org/linux-cxl/20250624141355.269056-21-alejandro.lucero-palau@amd.com/


which gets completed in the last patch for integrating the sfc driver 
cxl pio buffers unwinding.


I think that is necessary. About this patch, I think it should be part 
of Type2 series with changes for adding the ioremap to the protected cxl 
region "attachment". After that the CXL region can be safely used ... 
until the sfc driver explicitly exits or until the callback is invoked 
triggered by cxl_acpi removal or cxl_mem unbinding. The sfc driver will 
safely stop using pio buffers keeping the normal packet sending using DMA.


I'll work on a v26 with these changes.



  reply	other threads:[~2026-04-15 12:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03 21:00 [RFC PATCH 0/4] cxl: Region attach for accelerators Dan Williams
2026-04-03 21:00 ` [RFC PATCH 1/4] cxl/mem: Add support to cleanly continue after attach Dan Williams
2026-04-09 22:02   ` Cheatham, Benjamin
2026-04-11 22:33     ` Dan Williams
2026-04-03 21:00 ` [RFC PATCH 2/4] cxl/region: Move region lock error code to -EBUSY Dan Williams
2026-04-03 21:00 ` [RFC PATCH 3/4] cxl/region: Block region delete for locked regions Dan Williams
2026-04-03 21:00 ` [RFC PATCH 4/4] cxl/region: Introduce cxl_memdev_attach_region Dan Williams
2026-04-07 10:25   ` Alejandro Lucero Palau
2026-04-11 21:42     ` Dan Williams
2026-04-14 15:41       ` Alejandro Lucero Palau
2026-04-15 12:57         ` Alejandro Lucero Palau [this message]
2026-04-09 22:02   ` Cheatham, Benjamin
2026-04-11 23:02     ` Dan Williams
2026-04-12  8:57       ` Lukas Wunner
2026-04-13 14:25       ` Cheatham, Benjamin

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=b2a780eb-4e62-4fde-9af7-8b2410a98187@amd.com \
    --to=alucerop@amd.com \
    --cc=alejandro.lucero-palau@amd.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=djbw@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.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