From: Frank Li <Frank.li@oss.nxp.com>
To: Koichiro Den <den@valinux.co.jp>
Cc: "Frank Li" <Frank.Li@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Jon Mason" <jdmason@kudzu.us>,
"Dave Jiang" <dave.jiang@intel.com>,
"Allen Hubbe" <allenbh@gmail.com>,
"Niklas Cassel" <cassel@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Jingoo Han" <jingoohan1@gmail.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Jerome Brunet" <jbrunet@baylibre.com>,
linux-pci@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, ntb@lists.linux.dev
Subject: Re: [PATCH v6 8/8] Documentation: PCI: endpoint: Document vNTB DMA export
Date: Tue, 20 Oct 2026 13:49:50 -0500 [thread overview]
Message-ID: <ate3zkYAu4fGN06j@SMW015318> (raw)
In-Reply-To: <20261020054948.1218370-9-den@valinux.co.jp>
On Tue, Oct 20, 2026 at 02:49:48PM +0900, Koichiro Den wrote:
> Document the dma_bar attribute and the requirements for exporting
> endpoint DMA channels. Also document how the selected BAR may be shared
> with an MW.
>
> Signed-off-by: Koichiro Den <den@valinux.co.jp>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Changes since v5:
> - No changes.
>
> Documentation/PCI/endpoint/pci-vntb-howto.rst | 31 +++++++++++++++++--
> 1 file changed, 28 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/PCI/endpoint/pci-vntb-howto.rst b/Documentation/PCI/endpoint/pci-vntb-howto.rst
> index 3679f5c30254..7ca4e1ff095c 100644
> --- a/Documentation/PCI/endpoint/pci-vntb-howto.rst
> +++ b/Documentation/PCI/endpoint/pci-vntb-howto.rst
> @@ -90,9 +90,9 @@ of the function device and is populated with the following NTB specific
> attributes that can be configured by the user::
>
> # ls functions/pci_epf_vntb/func1/pci_epf_vntb.0/
> - ctrl_bar db_count mw1_bar mw2_bar mw3_bar mw4_bar spad_count
> - db_bar mw1 mw2 mw3 mw4 num_mws vbus_number
> - vntb_vid vntb_pid
> + ctrl_bar dma_bar mw2 mw3_bar num_mws vntb_pid
> + db_bar mw1 mw2_bar mw4 spad_count vntb_vid
> + db_count mw1_bar mw3 mw4_bar vbus_number
>
> A sample configuration for NTB function is given below::
>
> @@ -105,6 +105,31 @@ By default, each construct is assigned a BAR, as needed and in order.
> Should a specific BAR setup be required by the platform, BAR may be assigned
> to each construct using the related ``XYZ_bar`` entry.
>
> +To export DMA channels, set ``dma_bar`` before binding the function.
> +For example::
> +
> + # echo 5 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/dma_bar
> +
> +This currently supports the unrolled DesignWare eDMA layout. The EPC must
> +support subrange and dynamic inbound mappings.
> +
> +``dma_bar`` cannot select the control or doorbell BAR.
> +Any rounded-up BAR tail is scratch-backed.
> +
> +Leaving ``dma_bar`` unassigned disables DMA export.
> +With a separate DMA BAR, an older ``ntb_hw_epf`` peer can ignore the extension
> +and continue without DMA. A peer that understands the extension also continues
> +without DMA if the advertised type is unavailable or no DMA IRQ can be
> +allocated.
> +
> +If no spare BAR is available, ``dma_bar`` can select the BAR of one MW instead.
> +DMA resources then follow that MW. In this configuration:
> +
> +* The shared MW size must be a power of two and its translation must cover the
> + full configured size.
> +* An updated peer is required because older peers treat the whole BAR as an
> + MW.
> +
> A sample configuration for virtual NTB driver for virtual PCI bus::
>
> # echo 0x1957 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vntb_vid
> --
> 2.54.0
>
prev parent reply other threads:[~2026-10-20 18:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 5:49 [PATCH v6 0/8] PCI: endpoint: Remote DMA support via vNTB Koichiro Den
2026-10-20 5:49 ` [PATCH v6 1/8] PCI: endpoint: Add DMA auxiliary resource metadata Koichiro Den
2026-10-20 5:49 ` [PATCH v6 2/8] PCI: dwc: Expose endpoint DMA resources Koichiro Den
2026-10-20 5:49 ` [PATCH v6 3/8] PCI: endpoint: pci-epf-vntb: Move epf_ntb_is_bar_used() up Koichiro Den
2026-10-20 5:49 ` [PATCH v6 4/8] PCI: endpoint: Add pci-epf-ntb.h for the shared NTB control layout Koichiro Den
2026-10-20 5:49 ` [PATCH v6 5/8] PCI: endpoint: pci-epf-vntb: Export endpoint DMA channels Koichiro Den
2026-10-20 17:00 ` Frank Li
2026-10-20 5:49 ` [PATCH v6 6/8] NTB: ntb_hw_epf: Discover vNTB-embedded DMA Koichiro Den
2026-10-20 17:03 ` Frank Li
2026-10-20 5:49 ` [PATCH v6 7/8] PCI/NTB: endpoint: Allow DMA and MW to share a BAR Koichiro Den
2026-10-20 17:11 ` Frank Li
2026-10-20 5:49 ` [PATCH v6 8/8] Documentation: PCI: endpoint: Document vNTB DMA export Koichiro Den
2026-10-20 18:49 ` Frank Li [this message]
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=ate3zkYAu4fGN06j@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@kernel.org \
--cc=allenbh@gmail.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=corbet@lwn.net \
--cc=dave.jiang@intel.com \
--cc=den@valinux.co.jp \
--cc=jbrunet@baylibre.com \
--cc=jdmason@kudzu.us \
--cc=jingoohan1@gmail.com \
--cc=kishon@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=ntb@lists.linux.dev \
--cc=rdunlap@infradead.org \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.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