From: Nathan Lynch via B4 Relay <devnull+nathan.lynch.amd.com@kernel.org>
To: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
David Rientjes <rientjes@google.com>,
John.Kariuki@amd.com, Kinsey Ho <kinseyho@google.com>,
Mario Limonciello <mario.limonciello@amd.com>,
PradeepVineshReddy.Kodamati@amd.com,
Shivank Garg <shivankg@amd.com>,
Stephen Bates <Stephen.Bates@amd.com>,
Wei Huang <wei.huang2@amd.com>, Wei Xu <weixugc@google.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>,
Nathan Lynch <nathan.lynch@amd.com>, Frank Li <Frank.Li@nxp.com>
Subject: [PATCH v2 00/23] dmaengine: Smart Data Accelerator Interface (SDXI) basic support
Date: Mon, 11 May 2026 14:16:12 -0500 [thread overview]
Message-ID: <20260511-sdxi-base-v2-0-889cfed17e3f@amd.com> (raw)
The Smart Data Accelerator Interface (SDXI) is a vendor-neutral
architecture for memory-to-memory data movement offload designed for
kernel bypass and virtualization.
General information on SDXI may be found at:
https://www.snia.org/sdxi
This submission adds a driver with basic support for PCIe-hosted SDXI
1.0 implementations and includes a DMA engine provider with memcpy
capability.
Planned future SDXI work (out of scope for this series):
* Character device for exposing SDXI contexts to user space.
* Support for operation types to be added in future SDXI revisions.
* Greater configurability for control structures, e.g. descriptor ring
size.
The latest released version of the SDXI specification is 1.0:
https://www.snia.org/sites/default/files/technical-work/sdxi/release/SNIA-SDXI-Specification-v1.0a.pdf
Draft versions of future SDXI specifications in development may be found at:
https://www.snia.org/tech_activities/publicreview#sdxi
---
Changes in v2:
- Drop unneeded dma_set_mask_and_coherent() result check. (Frank Li)
- Inline SDXI_DRV_DESC directly into MODULE_DESCRIPTION(). (FL)
- Drop unneeded braces from simple conditionals. (FL)
- Drop sdxi logging wrapper macros; use dev_dbg, dev_info etc
directly. (FL)
- Reordering of commit message (patch 04, "Feature
discovery..."). (FL)
- Use read_poll_timeout() for function start and stop routines. (FL)
- Align multi-line FIELD_PREP() uses. (FL)
- Drop sdxi_create_dma_pool() helper. (FL)
- Remove unneeded dma_wmb() before iowrite64() to doorbell. (FL)
- Use WRITE_ONCE() to update descriptor ring write index. (FL)
- Make sdxi_completion_poll() eventually time out and adjust call
sites. (FL)
- Remove vestigial sdxi_dma_unregister() declaration. (FL)
- Reserve context ID before allocating context data structures instead
of after.
- Update context ID class to transfer ownership of ID to context
object; sdxi_free_cxt() now responsible for releasing ID once
assigned.
- Align small frequently-updated DMA pool objects to cacheline
boundaries.
- Drop redundant dma_set_mask_and_coherent() from DMA provider.
- Log unarchitected function status values in sdxi_dev_gsv().
- Remove sdxi_to_dev(); the abstraction is unnecessary and sdxi->dev
is shorter.
- Link to v1: https://patch.msgid.link/20260410-sdxi-base-v1-0-1d184cb5c60a@amd.com
Changes in v1:
- Reorder series and introduce functionality incrementally while
remaining buildable and functional at each step. (Jonathan Cameron)
- Use devres APIs where possible for device resources (JC)
- Use cleanup APIs to significantly reduce use of goto-oriented error
unwinding. (JC)
- Drop SDXI_DEBUG config option. (JC)
- Cite SDXI spec version and section number consistently throughout. (JC)
- Combine local variable declarations of same type. (JC)
- Mark descriptor structs __packed. (JC)
- Use designated initializers in descriptor encoding functions. (JC)
- Prefer dev_err_probe() over sdxi_err() in sdxi_pci_init(). (JC)
- Prune unnecessary includes throughout source files. (JC)
- Remove unnecessary/unhelpful comments in several places. (JC)
- Remove SDXI spec material from "Add SNIA SDXI accelerator sub-class"
commit message and reword the remainder. (Bjorn Helgaas)
- Remove unnecessary local for DMA_BIT_MASK() argument in
sdxi_pci_init(). (BH)
- Use "{ }" for final null entry in id table, not "{ 0, }". (BH)
- Replace sample descriptor submission code from the SDXI spec with an
improved API that has unit tests, eliminates a copy step for
callers, and can block until ring space becomes available if
desired.
- Omit the error log facility for now; it can be reintroduced later.
- Use a per-device xarray to allocate context IDs and map them to
context objects.
- Implement interrupt-based completion signaling for memcpy operations
in the DMA engine provider, DMA provider code mostly rewritten.
Non-changes in v1:
- Mario suggested that pci_clear_master() is needed in
sdxi_pci_init()'s error path and in sdxi_pci_exit() (now
sdxi_pci_remove()). However, sdxi uses pcim_enable_device(), which
appears to ensure that master is cleared for the device. Happy to
revisit this if I'm mistaken.
- Link to RFC: https://lore.kernel.org/r/20250905-sdxi-base-v1-0-d0341a1292ba@amd.com
---
Nathan Lynch (23):
PCI: Add SNIA SDXI accelerator sub-class
MAINTAINERS: Add entry for SDXI driver
dmaengine: sdxi: Add PCI initialization
dmaengine: sdxi: Feature discovery and initial configuration
dmaengine: sdxi: Configure context tables
dmaengine: sdxi: Allocate DMA pools
dmaengine: sdxi: Allocate administrative context
dmaengine: sdxi: Install administrative context
dmaengine: sdxi: Start functions on probe, stop on remove
dmaengine: sdxi: Complete administrative context jump start
dmaengine: sdxi: Add client context alloc and release APIs
dmaengine: sdxi: Add descriptor ring management
dmaengine: sdxi: Add unit tests for descriptor ring reservations
dmaengine: sdxi: Attach descriptor ring state to contexts
dmaengine: sdxi: Per-context access key (AKey) table entry allocator
dmaengine: sdxi: Generic descriptor manipulation helpers
dmaengine: sdxi: Add completion status block API
dmaengine: sdxi: Encode context start, stop, and sync descriptors
dmaengine: sdxi: Provide context start and stop APIs
dmaengine: sdxi: Encode nop, copy, and interrupt descriptors
dmaengine: sdxi: Add unit tests for descriptor encoding
dmaengine: sdxi: MSI/MSI-X vector allocation and mapping
dmaengine: sdxi: Add DMA engine provider
MAINTAINERS | 7 +
drivers/dma/Kconfig | 2 +
drivers/dma/Makefile | 1 +
drivers/dma/sdxi/.kunitconfig | 4 +
drivers/dma/sdxi/Kconfig | 18 ++
drivers/dma/sdxi/Makefile | 16 ++
drivers/dma/sdxi/completion.c | 87 +++++++
drivers/dma/sdxi/completion.h | 25 ++
drivers/dma/sdxi/context.c | 507 ++++++++++++++++++++++++++++++++++++
drivers/dma/sdxi/context.h | 109 ++++++++
drivers/dma/sdxi/descriptor.c | 198 ++++++++++++++
drivers/dma/sdxi/descriptor.h | 135 ++++++++++
drivers/dma/sdxi/descriptor_kunit.c | 484 ++++++++++++++++++++++++++++++++++
drivers/dma/sdxi/device.c | 357 +++++++++++++++++++++++++
drivers/dma/sdxi/dma.c | 499 +++++++++++++++++++++++++++++++++++
drivers/dma/sdxi/dma.h | 11 +
drivers/dma/sdxi/hw.h | 254 ++++++++++++++++++
drivers/dma/sdxi/mmio.h | 57 ++++
drivers/dma/sdxi/pci.c | 115 ++++++++
drivers/dma/sdxi/ring.c | 159 +++++++++++
drivers/dma/sdxi/ring.h | 84 ++++++
drivers/dma/sdxi/ring_kunit.c | 105 ++++++++
drivers/dma/sdxi/sdxi.h | 138 ++++++++++
include/linux/pci_ids.h | 1 +
24 files changed, 3373 insertions(+)
---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20250813-sdxi-base-73d7c9fdce57
Best regards,
--
Nathan Lynch <nathan.lynch@amd.com>
next reply other threads:[~2026-05-11 19:16 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 19:16 Nathan Lynch via B4 Relay [this message]
2026-05-11 19:16 ` [PATCH v2 01/23] PCI: Add SNIA SDXI accelerator sub-class Nathan Lynch via B4 Relay
2026-05-11 20:48 ` Frank Li
2026-05-11 19:16 ` [PATCH v2 02/23] MAINTAINERS: Add entry for SDXI driver Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 03/23] dmaengine: sdxi: Add PCI initialization Nathan Lynch via B4 Relay
2026-05-11 21:22 ` Frank Li
2026-05-11 19:16 ` [PATCH v2 04/23] dmaengine: sdxi: Feature discovery and initial configuration Nathan Lynch via B4 Relay
2026-05-11 21:30 ` Frank Li
2026-05-11 19:16 ` [PATCH v2 05/23] dmaengine: sdxi: Configure context tables Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 06/23] dmaengine: sdxi: Allocate DMA pools Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 07/23] dmaengine: sdxi: Allocate administrative context Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 08/23] dmaengine: sdxi: Install " Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 09/23] dmaengine: sdxi: Start functions on probe, stop on remove Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 10/23] dmaengine: sdxi: Complete administrative context jump start Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 11/23] dmaengine: sdxi: Add client context alloc and release APIs Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 12/23] dmaengine: sdxi: Add descriptor ring management Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 13/23] dmaengine: sdxi: Add unit tests for descriptor ring reservations Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 14/23] dmaengine: sdxi: Attach descriptor ring state to contexts Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 15/23] dmaengine: sdxi: Per-context access key (AKey) table entry allocator Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 16/23] dmaengine: sdxi: Generic descriptor manipulation helpers Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 17/23] dmaengine: sdxi: Add completion status block API Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 18/23] dmaengine: sdxi: Encode context start, stop, and sync descriptors Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 19/23] dmaengine: sdxi: Provide context start and stop APIs Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 20/23] dmaengine: sdxi: Encode nop, copy, and interrupt descriptors Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 21/23] dmaengine: sdxi: Add unit tests for descriptor encoding Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 22/23] dmaengine: sdxi: MSI/MSI-X vector allocation and mapping Nathan Lynch via B4 Relay
2026-05-11 19:16 ` [PATCH v2 23/23] dmaengine: sdxi: Add DMA engine provider Nathan Lynch via B4 Relay
2026-05-11 20:47 ` Frank Li
2026-05-11 22:28 ` Lynch, Nathan
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=20260511-sdxi-base-v2-0-889cfed17e3f@amd.com \
--to=devnull+nathan.lynch.amd.com@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=John.Kariuki@amd.com \
--cc=PradeepVineshReddy.Kodamati@amd.com \
--cc=Stephen.Bates@amd.com \
--cc=bhelgaas@google.com \
--cc=dmaengine@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=kinseyho@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=nathan.lynch@amd.com \
--cc=rientjes@google.com \
--cc=shivankg@amd.com \
--cc=vkoul@kernel.org \
--cc=wei.huang2@amd.com \
--cc=weixugc@google.com \
/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