From: Sean Christopherson <seanjc@google.com>
To: Josh Hilke <jrhilke@google.com>
Cc: Alex Williamson <alex@shazbot.org>,
David Matlack <dmatlack@google.com>,
Vipin Sharma <vipinsh@google.com>,
Raghavendra Rao Ananta <rananta@google.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] vfio: selftests: Find devices that have VFIO selftest drivers
Date: Fri, 8 May 2026 15:20:25 -0700 [thread overview]
Message-ID: <af5hqRVaI04EG019@google.com> (raw)
In-Reply-To: <CAAdrzjtvG2XrzjxFqGPOyiFL0QWeg-cY3TMdsj77ZdLivO8R1g@mail.gmail.com>
On Fri, May 08, 2026, Josh Hilke wrote:
> On Fri, May 8, 2026 at 11:17 AM Sean Christopherson <seanjc@google.com> wrote:
> >
> > On Tue, Apr 14, 2026, Josh Hilke wrote:
> > > +# Print the segment:bus:device.function numbers of PCI devices that can be used
> > > +# to run VFIO selftests.
> > > +function main() {
> > > + local vendor_device_id
> > > +
> > > + for vendor_device_id in "${DEVICES[@]}"; do
> > > + lspci -D -d "${vendor_device_id}" | awk '{print $1}'
> >
> > For ignorant people like me, it would be helpful to capture what device was actually
> > found. I mean, I don't necessarily know exactly what these devices do, but as the
> > list grows, at least having a general sense of what device I'm going to be feeding
> > into VFIO would be helpful.
> >
>
> Sure I can do that.
>
> > # ./devices.sh
> > Intel SPR DSA (8086:0b25) Device IDs:
> > 0000:6a:01.0
> > 0000:6f:01.0
> > 0000:74:01.0
> > 0000:79:01.0
> > 0000:e7:01.0
> > 0000:ec:01.0
> > 0000:f1:01.0
> > 0000:f6:01.0
>
> How about a "-v" (verbose) option which prints the device name
> alongside the BDF?
> Works for me.
> $ ./list_devices.sh -v
> 0000:6a:01.0 Intel SPR DSA (8086:0b25)
> 0000:6f:01.0 Intel SPR DSA (8086:0b25)
Maybe add a dash to visually separate things? E.g.
0000:6a:01.0 - Intel SPR DSA (8086:0b25)
> This approach preserves the ability to pipe the script output into
> /tools/testing/selftests/vfio/scripts/setup.sh to automate binding the
> devices to VFIO by excluding the -v arg since the setup script expects
> a list of BDFs.
Alternatively, -q for quiet? Or:
./devices.sh | cut -f 1 -d ' ' | setup.sh
Or have setup.h do the cutting? I'm a-ok with a -v, but if the script is mostly
going to be run by humans (no idea if this is true), it seems like it should use
the more verbose version by default.
next prev parent reply other threads:[~2026-05-08 22:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 23:09 [PATCH v2 0/1] vfio: selftests: Find devices that have VFIO selftest drivers Josh Hilke
2026-04-14 23:09 ` [PATCH v2 1/1] " Josh Hilke
2026-04-16 23:35 ` David Matlack
2026-05-08 18:17 ` Sean Christopherson
2026-05-08 22:03 ` Josh Hilke
2026-05-08 22:20 ` Sean Christopherson [this message]
2026-05-08 22:49 ` David Matlack
2026-05-11 16:12 ` Josh Hilke
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=af5hqRVaI04EG019@google.com \
--to=seanjc@google.com \
--cc=alex@shazbot.org \
--cc=dmatlack@google.com \
--cc=jrhilke@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rananta@google.com \
--cc=vipinsh@google.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