All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Levon <john.levon@nutanix.com>
To: Naman Gulati <namangulati@google.com>
Cc: qemu-devel@nongnu.org,
	"Thanos Makatos" <thanos.makatos@nutanix.com>,
	"Cédric Le Goater" <clg@redhat.com>,
	"Alex Williamson" <alex@shazbot.org>,
	"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
	"Matt Evans" <matt@ozlabs.org>
Subject: Re: [RFC PATCH 2/3] vfio: mmap sparse regions backed by multiple FDs
Date: Fri, 14 Aug 2026 20:53:31 +0100	[thread overview]
Message-ID: <an9yM6aSsFaCHokk@lent> (raw)
In-Reply-To: <CAMP57yU0_0YbnuAGt7iAv4p3qW9cX=1TkpsesAVTs06Y9ZJtbQ@mail.gmail.com>

On Fri, Aug 14, 2026 at 12:48:30PM -0700, Naman Gulati wrote:

> > Given that you've introduced a dependency on VFIORegion in the
> > include/hw/vfio/vfio-device.h for the other callback, I'm wondering why we don't
> > just store an array of VFIORegions in VFIODevice instead of reginfo+region_fds ?
> 
> I tried to maintain the idiom that the VFIORegion region is synonymous
> with one single BAR region. As before each VFIORegion has multiple
> mmap areas underneath, the fd for each is now held in the region_fds
> list.

Sure, I didn't mean to imply otherwise. i.e. each individual region - whatever
the type is - would have region info plus some number of fds.

> > I'm also not sure why we have a sparse mmaps callback - why can't that be
> > generic code that handles both capabilities? Are you concerned about the cap
> > number clashing in future vfio kernel versions perhaps?
> 
> Yes I wanted to encapsulate vfio-user specific handling within the
> vfio-user logic so that it doesn't conflict with the pure vfio device
> handling. It felt odd to me to introduce generic handling of a
> capability that's only exposed by one flavor of device and not the
> other. However, no strong opinions, I can refactor and generalize the
> cap handling if that's preferred, and the risks of cap number clashes
> are okay.

I can see the argument either way.

regards
john


  reply	other threads:[~2026-08-14 19:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11 23:39 [RFC PATCH 0/3] vfio-user: support multiple FDs backing region mmaps Naman Gulati
2026-08-11 23:39 ` [RFC PATCH 1/3] vfio-user: add multi-fd region mmap capability Naman Gulati
2026-08-11 23:39 ` [RFC PATCH 2/3] vfio: mmap sparse regions backed by multiple FDs Naman Gulati
2026-08-14  8:52   ` John Levon
2026-08-14 19:48     ` Naman Gulati
2026-08-14 19:53       ` John Levon [this message]
2026-08-11 23:39 ` [RFC PATCH 3/3] vfio-user: implement client support for multi-fd region mmap Naman Gulati

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=an9yM6aSsFaCHokk@lent \
    --to=john.levon@nutanix.com \
    --cc=alex@shazbot.org \
    --cc=clg@redhat.com \
    --cc=matt@ozlabs.org \
    --cc=namangulati@google.com \
    --cc=pierrick.bouvier@oss.qualcomm.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.