From: sashiko-bot@kernel.org
To: "David Matlack" <dmatlack@google.com>,
dri-devel@lists.freedesktop.org, kvm@vger.kernel.org,
linux-pci@vger.kernel.org
Cc: media-ci@linuxtv.org
Subject: Re: [RFC PATCH 7/7] vfio: selftests: Add P2P DMA selftest
Date: Wed, 11 Nov 2026 19:47:41 +0000 [thread overview]
Message-ID: <sashiko-outbox-209593@kernel.org> (raw)
In-Reply-To: <20261111192411.4133780-8-dmatlack@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] vfio: selftests: missing -ENOTTY skip check for
__vfio_pci_dmabuf_create()
--
commit 3d8e1bca27abb87842a5dfc06a0cde5ad88fe0fb
Author: David Matlack <dmatlack@google.com>
vfio: selftests: Add P2P DMA selftest
This commit adds vfio_pci_p2pdma_test to validate peer-to-peer DMA between
an initiator device and a target device's memory BAR across supported IOMMU
modes, including dmabuf revocation.
> diff --git a/tools/testing/selftests/vfio/vfio_pci_p2pdma_test.c b/tools/testing/selftests/vfio/vfio_pci_p2pdma_test.c
> new file mode 100644
> index 0000000000000..43e1537076ad1
> --- /dev/null
> +++ b/tools/testing/selftests/vfio/vfio_pci_p2pdma_test.c
[ ... ]
> +FIXTURE_SETUP(vfio_pci_p2pdma_test)
> +{
[ ... ]
> + if (self->iommu->iommufd) {
> + u32 bar_idx = self->mem_bar.bar->info.index;
> +
> + self->dmabuf_fd = __vfio_pci_dmabuf_create(self->target,
> + bar_idx,
> + self->mem_bar.offset,
> + bar_map_size,
> + O_RDWR | O_CLOEXEC);
> + if (self->dmabuf_fd == -EOPNOTSUPP)
> + SKIP(return, "Kernel does not support VFIO_DEVICE_FEATURE_DMA_BUF");
> + ASSERT_GE(self->dmabuf_fd, 0);
[Severity: Medium]
Should this check also skip when self->dmabuf_fd is -ENOTTY? When
CONFIG_VFIO_PCI_DMABUF is disabled (or on kernels predating
VFIO_DEVICE_FEATURE_DMA_BUF), the vfio_pci_core_feature_dma_buf() stub and
vfio_pci_core_ioctl_feature() return -ENOTTY rather than -EOPNOTSUPP,
causing the iommufd test variants to fail at ASSERT_GE() instead of
skipping.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111192411.4133780-1-dmatlack@google.com?part=7
prev parent reply other threads:[~2026-11-11 19:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 19:24 [RFC PATCH 0/7] vfio: selftests: Add peer-to-peer DMA selftest David Matlack
2026-11-11 19:24 ` [RFC PATCH 1/7] vfio: selftests: Add vfio_pci_find_mem_bar() helper David Matlack
2026-11-11 19:38 ` sashiko-bot
2026-11-11 19:24 ` [RFC PATCH 2/7] vfio: selftests: Verify memory behavior in vfio_pci_find_mem_bar() David Matlack
2026-11-11 19:38 ` sashiko-bot
2026-11-11 19:24 ` [RFC PATCH 3/7] vfio: selftests: Allow multiple BDFs in VFIO_SELFTESTS_BDF David Matlack
2026-11-11 19:38 ` sashiko-bot
2026-11-11 19:24 ` [RFC PATCH 4/7] vfio: selftests: Add vfio_pci_dmabuf_create() helper David Matlack
2026-11-11 19:38 ` sashiko-bot
2026-11-11 19:24 ` [RFC PATCH 5/7] vfio: selftests: Add iommu_map_file() helper David Matlack
2026-11-11 19:40 ` sashiko-bot
2026-11-11 19:24 ` [RFC PATCH 6/7] vfio: selftests: Add vfio_pci_find_p2p_pair() helper David Matlack
2026-11-11 19:39 ` sashiko-bot
2026-11-11 19:24 ` [RFC PATCH 7/7] vfio: selftests: Add P2P DMA selftest David Matlack
2026-11-11 19:47 ` sashiko-bot [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=sashiko-outbox-209593@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dmatlack@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kvm@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=media-ci@linuxtv.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