From: Sean Christopherson <seanjc@google.com>
To: David Matlack <dmatlack@google.com>
Cc: Josh Hilke <jrhilke@google.com>,
Alex Williamson <alex@shazbot.org>,
Vipin Sharma <vipinsh@google.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Raghavendra Rao Ananta <rananta@google.com>
Subject: Re: [PATCH v6] vfio: selftests: Find devices that have VFIO selftest drivers
Date: Fri, 5 Jun 2026 11:19:17 -0700 [thread overview]
Message-ID: <aiMTJa1KHHgpTbDq@google.com> (raw)
In-Reply-To: <CALzav=dCjGHMfDaW87jKOhquUvY6uEns1i+wGY1Kbq2A7Pfreg@mail.gmail.com>
On Fri, Jun 05, 2026, David Matlack wrote:
> On Thu, Jun 4, 2026 at 1:30 PM David Matlack <dmatlack@google.com> wrote:
> >
> > On Thu, Jun 4, 2026 at 12:50 PM Sean Christopherson <seanjc@google.com> wrote:
> > >
> > > On Tue, Jun 02, 2026, Josh Hilke wrote:
> > > > Add a new script, list_supported_devices.sh, which prints out the
> > > > segment:bus:device.function (SBDF) numbers and names of devices on a
> > > > machine that have a VFIO selftest driver. This makes it easier to
> > > > determine if the system is capable of running VFIO selftests.
> > > >
> > > > Includes a -q (quiet) argument which prints just the SBDFs so that the
> > > > output can be passed to tools/testing/selftests/vfio/scripts/setup.sh
> > > > (e.g. via xargs) to bind the devices to VFIO to use in VFIO selftests.
> > > >
> > > > Examples:
> > > >
> > > > $ ./list_supported_devices.sh
> > > > 0000:6a:01.0 - Intel DSA SPR [8086:0b25]
> > > > 0000:6f:01.0 - Intel DSA SPR [8086:0b25]
> > > > 0000:74:01.0 - Intel DSA SPR [8086:0b25]
> > > >
> > > > $ ./list_supported_devices.sh -q
> > > > 0000:6a:01.0
> > > > 0000:6f:01.0
> > > > 0000:74:01.0
> > > >
> > > > Suggested-by: Sean Christopherson <seanjc@google.com>
> > > > Signed-off-by: Josh Hilke <jrhilke@google.com>
> > >
> > > NAK, until this stuff is fixed and properly documented.
> > >
> > > This script needs to (a) communicate that some of the devices may be on VFIO's
> > > denylist, (b) NOT report them by default, (c) let the user report denylisted
> > > devices, (d) make it *very* clear in the output that a device, and (e) ideally
> > > provide the user with a hint of how that might be able to test a denied device,
> > > e.g. by reloading vfio-pci with disable_denylist=1.
> > >
> > > Nothing in here so much as mentions that these "supported" devices may be
> > > disallowed by the kernel, including the devices that's USED AS THE EXAMPLE.
> > >
> > > The DSA SPR devices has been on the naughty list since commit 95feb3160eef ("VFIO:
> > > Add the SPR_DSA and SPR_IAX devices to the denylist") from 2024, so I have a
> > > very hard time believing y'all weren't aware of this. And if you really truly
> > > weren't aware of this quirk, than what exactly are you even testing!?!?
> > >
> > > C'mon.
> >
> > Yeah vfio_pci.disable_denylist=Y is required to use the Intel DSA SPR
> > device. This script is a great place to capture that previously hidden
> > requirement.
> >
> > Your proposed (a)-(e) sound good to me.
>
> Another direction we could go in here would be to set disable_denylist
> to Y in setup.sh (if it is currently N) and set it back to N in
> cleanup.sh (after the last device is cleaned up and only if it was
> previously N). I was already thinking about doing something similar
> for setting enable_srio to Y for Raghu's new SR-IOV uAPI test.
>
> The only issue is that disable_denylist is not currently writable. I
> don't see any functional reason why it can't be writable though. It is
> just sampled during probe. And from a security perspective, privileged
> users can already reload vfio-pci with different parameters if it is
> built as a module. But for built-ins, this would enable the denylist
> to be disabled.
IMO, any changes to setup.h are completely orthogonal. list_supported_devices.sh
can and will be run independently, e.g. by people like me, and so absolutely needs
to claim a device is supported when it's obviously not.
Actually, that's a good amendment to (b) above. Instead of *never* reporting
denylisted devices by default, have the script check disable_denylist and act
accordingly. And then it's "just" a matter of communicating these details to
the user, e.g. so that a user can find devices that are supported by selftests,
but not by their currently loaded kernel+modules.
prev parent reply other threads:[~2026-06-05 18:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 22:29 [PATCH v6] vfio: selftests: Find devices that have VFIO selftest drivers Josh Hilke
2026-06-04 19:50 ` Sean Christopherson
2026-06-04 20:30 ` David Matlack
2026-06-05 16:11 ` David Matlack
2026-06-05 18:19 ` Sean Christopherson [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=aiMTJa1KHHgpTbDq@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 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.