From: Amit Machhiwal <amachhiw@linux.ibm.com>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: Alex Mastro <amastro@fb.com>,
Alex Williamson <alex.williamson@redhat.com>,
Jonathan Corbet <corbet@lwn.net>, Jason Gunthorpe <jgg@ziepe.ca>,
Keith Busch <kbusch@kernel.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-doc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH v4] vfio/pci: print vfio-device syspath to fdinfo
Date: Fri, 8 Aug 2025 22:51:06 +0530 [thread overview]
Message-ID: <20250808224806.09f6d858-1d-amachhiw@linux.ibm.com> (raw)
In-Reply-To: <bc7e754f-f414-4c43-8f25-03314b894b34@kaod.org>
On 2025/08/08 06:44 PM, Cédric Le Goater wrote:
> On 8/8/25 17:45, Amit Machhiwal wrote:
> > Hi Cédric,
> >
> > Please find my comments inline:
> >
> > On 2025/08/08 03:49 PM, Cédric Le Goater wrote:
> > > Hello Amit,
> > >
> > > On 8/7/25 11:34, Amit Machhiwal wrote:
> > > > Hello,
> > > >
> > > > On 2025/08/04 12:44 PM, Alex Mastro wrote:
> > > > > Print the PCI device syspath to a vfio device's fdinfo. This enables tools
> > > > > to query which device is associated with a given vfio device fd.
> > > > >
> > > > > This results in output like below:
> > > > >
> > > > > $ cat /proc/"$SOME_PID"/fdinfo/"$VFIO_FD" | grep vfio
> > > > > vfio-device-syspath: /sys/devices/pci0000:e0/0000:e0:01.1/0000:e1:00.0/0000:e2:05.0/0000:e8:00.0
> > > > >
> > > > > Signed-off-by: Alex Mastro <amastro@fb.com>
> > > >
> > > > I tested this patch on a POWER9 bare metal system with a VFIO PCI device and
> > > > could see the VFIO device syspath in fdinfo.
> > >
> > > POWER9 running on OPAL FW : I am curious about the software stack.
> > >
> > > I suppose this is the latest upstream kernel ?
> >
> > Yes, I used the latest upstream kernel and applied this patch on top of commit
> > cca7a0aae895.
> >
> > > Are you using an upstream QEMU to test too ?
> >
> > No, I had used the Fedora 42 distro qemu. The version details are as below:
> >
> > [root@localhost ~]# qemu-system-ppc64 --version
> > QEMU emulator version 9.2.4 (qemu-9.2.4-1.fc42)
> > Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers
> >
> > I gave the upstream qemu (HEAD pointing to cd21ee5b27) a try and I see the same
> > behavior with that too.
> >
> > [root@localhost ~]# ./qemu-system-ppc64 --version
> > QEMU emulator version 10.0.92 (v10.1.0-rc2-4-gcd21ee5b27-dirty)
> > Copyright (c) 2003-2025 Fabrice Bellard and the QEMU Project developers
> >
> > [root@localhost ~]# cat /proc/52807/fdinfo/191
> > pos: 0
> > flags: 02000002
> > mnt_id: 17
> > ino: 1125
> > vfio-device-syspath: /sys/devices/pci0031:00/0031:00:00.0/0031:01:00.0
> >
> > >
> > > and which device ?
> >
> > I'm using a Broadcom NetXtreme network card (4-port) and passing through its
> > fn0.
> >
> > [root@guest ~]# lspci
> > [...]
> > 0001:00:01.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
> >
> > Please let me know if I may help you with any additional information.
>
> It is good to know that device pass-through still works with upstream on
> OpenPower servers.
>
> Have you tried VFs ?
I didn't get a chance to try VFs yet, Cédric.
>
> Thanks Amit,
No problem. :)
Thanks,
Amit
>
> C.
>
next prev parent reply other threads:[~2025-08-08 17:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-04 19:44 [PATCH v4] vfio/pci: print vfio-device syspath to fdinfo Alex Mastro
2025-08-07 9:34 ` Amit Machhiwal
2025-08-07 16:50 ` Alex Mastro
2025-08-08 13:49 ` Cédric Le Goater
2025-08-08 15:45 ` Amit Machhiwal
2025-08-08 16:44 ` Cédric Le Goater
2025-08-08 17:21 ` Amit Machhiwal [this message]
2025-08-14 8:58 ` Amit Machhiwal
2025-08-27 18:54 ` Alex Williamson
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=20250808224806.09f6d858-1d-amachhiw@linux.ibm.com \
--to=amachhiw@linux.ibm.com \
--cc=alex.williamson@redhat.com \
--cc=amastro@fb.com \
--cc=clg@kaod.org \
--cc=corbet@lwn.net \
--cc=jgg@ziepe.ca \
--cc=kbusch@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).