All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Levon <john.levon@nutanix.com>
To: "Cédric Le Goater" <clg@redhat.com>
Cc: qemu-devel@nongnu.org, Alex Williamson <alex@shazbot.org>,
	Thanos Makatos <thanos.makatos@nutanix.com>
Subject: Re: [PATCH 2/2] vfio: quieten dma-buf warning
Date: Thu, 9 Apr 2026 11:12:57 +0100	[thread overview]
Message-ID: <add7qUT5WUA26iOW@lent> (raw)
In-Reply-To: <ed00dc34-858e-4d5f-9b43-28c39ef561d7@redhat.com>

On Thu, Apr 09, 2026 at 11:53:58AM +0200, Cédric Le Goater wrote:

> 1. quick one:
> 
>   Return -ENOTSUP and test the value in vfio_region_create_dma_buf().
>   It's cleaner than masking EINVAL IMO.

Scratch that, vfio can return this error too:

220         if (!vdev->pci_ops || !vdev->pci_ops->get_dmabuf_phys)
221                 return -EOPNOTSUPP;

> 2. cleaner one:
> 
>   Add a capability field to VFIODeviceIOOps to advertise supported
>   features:
>     #define VFIO_IO_CAP_DMA_BUF        (1 << 0)
>     #define VFIO_IO_CAP_MIGRATION      (1 << 1)
>     struct VFIODeviceIOOps {
>       uint64_t capabilities;  /* Bitmask of VFIO_IO_CAP_* */
>       ..
> and test vbasedev->io_ops->capabilities where needed.
> 
> How's that ? I can implement option 2.

I'd appreciate it, thanks, please let me know.

regards
john


      parent reply	other threads:[~2026-04-09 10:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 19:53 [PATCH 0/2] vfio: Implement device features for vfio-user John Levon
2026-03-17 19:53 ` [PATCH 1/2] vfio-user: support VFIO_USER_DEVICE_FEATURE John Levon
2026-04-08  7:42   ` Cédric Le Goater
2026-04-08  9:00     ` John Levon
2026-03-17 19:53 ` [PATCH 2/2] vfio: quieten dma-buf warning John Levon
2026-04-08  7:52   ` Cédric Le Goater
2026-04-08  8:57     ` John Levon
2026-04-09  9:53       ` Cédric Le Goater
2026-04-09 10:05         ` John Levon
2026-04-09 10:12         ` John Levon [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=add7qUT5WUA26iOW@lent \
    --to=john.levon@nutanix.com \
    --cc=alex@shazbot.org \
    --cc=clg@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thanos.makatos@nutanix.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.