From: Alex Williamson <alex@shazbot.org>
To: Matt Evans <mattev@meta.com>
Cc: "Leon Romanovsky" <leon@kernel.org>,
"Jason Gunthorpe" <jgg@nvidia.com>,
"Alex Mastro" <amastro@fb.com>,
"Christian König" <christian.koenig@amd.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Logan Gunthorpe" <logang@deltatee.com>,
"Mahmoud Adam" <mngyadam@amazon.de>,
"David Matlack" <dmatlack@google.com>,
"Björn Töpel" <bjorn@kernel.org>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Kevin Tian" <kevin.tian@intel.com>,
"Ankit Agrawal" <ankita@nvidia.com>,
"Pranjal Shrivastava" <praan@google.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Vivek Kasireddy" <vivek.kasireddy@intel.com>,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
kvm@vger.kernel.org, linux-pci@vger.kernel.org, alex@shazbot.org
Subject: Re: [PATCH v2 9/9] vfio/pci: Add mmap() attributes to DMABUF feature
Date: Tue, 2 Jun 2026 13:14:17 -0600 [thread overview]
Message-ID: <20260602131417.41366391@shazbot.org> (raw)
In-Reply-To: <8854824e-06c2-43b3-86c2-8c2c28f9ad63@meta.com>
On Tue, 2 Jun 2026 17:50:04 +0100
Matt Evans <mattev@meta.com> wrote:
> On 29/05/2026 00:14, Alex Williamson wrote:
> > On Wed, 27 May 2026 03:23:12 -0700
> > Matt Evans <mattev@meta.com> wrote:
> >> + uint32_t old_attr = priv->memattr;
> >> +
> >> + if (flags & VFIO_DEVICE_FEATURE_SET) {
> >> + switch(db_attr.memattr) {
> >> + case VFIO_DEVICE_FEATURE_DMA_BUF_MEMATTR_NC:
> >> + case VFIO_DEVICE_FEATURE_DMA_BUF_MEMATTR_WC:
> >> + priv->memattr = db_attr.memattr;
> >> + break;
> >> +
> >> + default:
> >> + ret = -ENOTSUPP;
> >
> > -EINVAL
>
> I'd like to push back on this one; ENOTSUPP distinguishes trying to use
> a wild attribute value from all manner of other screwups such as
> trying to GET (with it no longer supported), passing an fd that isn't a
> DMABUF, etc.
>
> I'm not wed to the value ENOTSUPP, just something distinctive versus the
> other errors userspace might see, and that value seems appropriate.
It needs to be a uAPI errno though, aiui ENOTSUPP is an internal NFS
errno. How about EOPNOTSUPP? Thanks,
Alex
next prev parent reply other threads:[~2026-06-02 19:14 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 10:23 [PATCH v2 0/9] vfio/pci: Add mmap() for DMABUFs Matt Evans
2026-05-27 10:23 ` [PATCH v2 1/9] PCI/P2PDMA: Add CONFIG_PCI_P2PDMA_CORE Matt Evans
2026-05-27 16:07 ` Logan Gunthorpe
2026-05-27 17:13 ` Matt Evans
2026-05-27 21:09 ` Alex Williamson
2026-05-29 23:05 ` Jason Gunthorpe
2026-06-09 22:45 ` Bjorn Helgaas
2026-06-10 15:27 ` Pranjal Shrivastava
2026-06-10 16:00 ` Matt Evans
2026-05-27 10:23 ` [PATCH v2 2/9] vfio/pci: Add a helper to look up PFNs for DMABUFs Matt Evans
2026-05-27 22:38 ` Alex Williamson
2026-06-02 16:37 ` Matt Evans
2026-05-27 10:23 ` [PATCH v2 3/9] vfio/pci: Add a helper to create a DMABUF for a BAR-map VMA Matt Evans
2026-05-27 22:59 ` Alex Williamson
2026-06-02 16:39 ` Matt Evans
2026-05-27 10:23 ` [PATCH v2 4/9] vfio/pci: Convert BAR mmap() to use a DMABUF Matt Evans
2026-05-28 23:15 ` Alex Williamson
2026-06-02 18:01 ` Matt Evans
2026-05-27 10:23 ` [PATCH v2 5/9] vfio/pci: Provide a user-facing name for BAR mappings Matt Evans
2026-05-27 10:23 ` [PATCH v2 6/9] vfio/pci: Clean up BAR zap and revocation Matt Evans
2026-05-28 23:15 ` Alex Williamson
2026-05-27 10:23 ` [PATCH v2 7/9] vfio/pci: Support mmap() of a VFIO DMABUF Matt Evans
2026-05-28 23:15 ` Alex Williamson
2026-06-02 17:35 ` Matt Evans
2026-06-02 19:03 ` Alex Williamson
2026-05-27 10:23 ` [PATCH v2 8/9] vfio/pci: Permanently revoke a DMABUF on request Matt Evans
2026-05-28 23:14 ` Alex Williamson
2026-06-02 17:02 ` Matt Evans
2026-05-27 10:23 ` [PATCH v2 9/9] vfio/pci: Add mmap() attributes to DMABUF feature Matt Evans
2026-05-28 23:14 ` Alex Williamson
2026-06-02 16:50 ` Matt Evans
2026-06-02 19:14 ` Alex Williamson [this message]
2026-06-03 14:22 ` Matt Evans
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=20260602131417.41366391@shazbot.org \
--to=alex@shazbot.org \
--cc=amastro@fb.com \
--cc=ankita@nvidia.com \
--cc=apopple@nvidia.com \
--cc=bhelgaas@google.com \
--cc=bjorn@kernel.org \
--cc=christian.koenig@amd.com \
--cc=dmatlack@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jgg@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=leon@kernel.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=mattev@meta.com \
--cc=mngyadam@amazon.de \
--cc=praan@google.com \
--cc=sumit.semwal@linaro.org \
--cc=vivek.kasireddy@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.