linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Alex Mastro <amastro@fb.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
	peterx@redhat.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: [PATCH] vfio/pci: print vfio-device name to fdinfo
Date: Mon, 23 Jun 2025 15:50:12 -0600	[thread overview]
Message-ID: <aFnMFHsfi41M2siu@kbusch-mbp> (raw)
In-Reply-To: <20250623-vfio-fdinfo-v1-1-c9cec65a2922@fb.com>

On Mon, Jun 23, 2025 at 02:02:38PM -0700, Alex Mastro wrote:
> Print the PCI device name to a vfio device's fdinfo. This enables tools
> to query which device is associated with a given vfio device fd. It's
> inspired by eventfd's printing of "eventfd-id" (fs/eventfd.c), which
> lsof uses to format the NAME column (e.g. "[eventfd:7278]").
> 
> This results in output like below:
> 
> $ cat /proc/"$process_using_vfio"/fdinfo/"$vfio_device_fd" | grep vfio
> vfio-device-name: 0000:c6:00.0

procfs' fdinfo sounds like the right interface to append this attribute,
so looks looks good to me!

Reviewed-by: Keith Busch <kbusch@kernel.org>

  reply	other threads:[~2025-06-23 21:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23 21:02 [PATCH] vfio/pci: print vfio-device name to fdinfo Alex Mastro
2025-06-23 21:50 ` Keith Busch [this message]
2025-06-23 22:18 ` Alex Williamson
2025-06-23 23:14   ` Alex Mastro
2025-06-24  0:56   ` Jason Gunthorpe
2025-06-24 16:23     ` Alex Williamson
2025-06-24 18:12       ` Jason Gunthorpe
2025-06-24 16:35     ` Alex Mastro
2025-06-24 18:16       ` Jason Gunthorpe
2025-06-24 18:53         ` Alex Mastro
2025-06-24 18:58           ` Jason Gunthorpe

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=aFnMFHsfi41M2siu@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=alex.williamson@redhat.com \
    --cc=amastro@fb.com \
    --cc=jgg@ziepe.ca \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterx@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).