From: M Nikhil <nikh1092@linux.ibm.com>
To: linux-s390@vger.kernel.org, sashiko-reviews@lists.linux.dev
Cc: M Nikhil <nikh1092@linux.ibm.com>
Subject: [PATCH v12 0/2] zfcp: Use DMA streaming API to map I/O
Date: Mon, 21 Sep 2026 16:30:28 +0200 [thread overview]
Message-ID: <20260921143030.356432-1-nikh1092@linux.ibm.com> (raw)
In the existing zFCP driver, virtual addresses are translated directly
into bus (physical addresses) for DMA operations on all I/O buffers
passing from zFCP driver to the device.
Need for using DMA-API in zFCP driver:
In a Secure Execution environment, the host must ensure that device DMA
accesses are restricted to non-guest-private, page-sized memory blocks.
This prevents I/O failures that can occur when a device attempts to
access guest-private memory. Therefore, guest memory pages must be
prepared by the hypervisor before they become accessible to an I/O
device.
To support this requirement, the host Linux kernel must be reliably
informed whenever a memory region becomes eligible for device DMA access
and when that access must be revoked. This information must be
maintained correctly at least at page size granularity. To satisfy these
requirements, all I/O buffers used by the zFCP driver should be mapped
through the DMA API.
DMA API Integration in zFCP:
The zFCP driver is updated to use the DMA streaming API's to map all the
I/O buffers which will be passed to the device.
All zFCP I/O buffers (QTCB, SRB, CT/ELS and SCSI I/O) are represented as
scatter-gather lists and mapped through DMA API using dma_map_sgtable().
Once the DMA transfer is complete, the corresponding mappings are
released using dma_unmap_sgtable().
By routing all device-visible memory through the DMA mapping layer, the
driver ensures that:
1. DMA access is properly authorized before use.
2. DMA is revoked after use.
3. Secure Execution memory restrictions are honored.
Changes on the github can be found at:
https://github.ibm.com/M-Nikhil/linux/commits/zfcp_dma_api_implementation_io_path_version12
M Nikhil (2):
zfcp: Replace sg-list with sg_table in zfcp_fsf_ct_els structure
zfcp: Use DMA streaming API to map I/O
drivers/s390/scsi/zfcp_aux.c | 16 +++
drivers/s390/scsi/zfcp_dbf.c | 16 +--
drivers/s390/scsi/zfcp_def.h | 4 +
drivers/s390/scsi/zfcp_ext.h | 10 +-
drivers/s390/scsi/zfcp_fc.c | 36 +++--
drivers/s390/scsi/zfcp_fsf.c | 260 ++++++++++++++++++++++++++++------
drivers/s390/scsi/zfcp_fsf.h | 9 +-
drivers/s390/scsi/zfcp_qdio.c | 37 +++--
drivers/s390/scsi/zfcp_qdio.h | 27 ++--
9 files changed, 321 insertions(+), 94 deletions(-)
--
2.53.0
next reply other threads:[~2026-09-21 14:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 14:30 M Nikhil [this message]
2026-09-21 14:30 ` [PATCH v12 1/2] zfcp: Replace sg-list with sg_table in zfcp_fsf_ct_els structure M Nikhil
2026-09-21 14:30 ` [PATCH v12 2/2] zfcp: Use DMA streaming API to map I/O M Nikhil
-- strict thread matches above, loose matches on Subject: below --
2026-09-24 6:09 [PATCH v12 0/2] " M Nikhil
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=20260921143030.356432-1-nikh1092@linux.ibm.com \
--to=nikh1092@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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