From: Josh Hilke <jrhilke@google.com>
To: Alex Williamson <alex@shazbot.org>
Cc: Sean Christopherson <seanjc@google.com>,
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,
Josh Hilke <jrhilke@google.com>
Subject: [PATCH v2 0/1] vfio: selftests: Find devices that have VFIO selftest drivers
Date: Tue, 14 Apr 2026 23:09:42 +0000 [thread overview]
Message-ID: <20260414230943.41198-1-jrhilke@google.com> (raw)
v2 of this series is only a single patch which adds a new script to print the
segment:bus:device.function numbers of PCI devices on the user's system which
have a VFIO selftest driver.
Example:
$ ./tools/testing/selftests/vfio/scripts/list_devices.sh
0000:6a:01.0
0000:6f:01.0
0000:74:01.0
The devices are compatible with all VFIO selftests. Other devices may be
compatible with VFIO selftests that don't use the driver functionality, but no
gaurantees.
User's can automate binding devices to VFIO (which is required in order to run
the selftests) by directing the output of list_devices.sh into
tools/testing/selftests/vfio/scripts/setup.sh.
Example:
$ ./tools/testing/selftests/vfio/scripts/setup.sh $(./tools/testing/selftests/vfio/scripts/list_devices.sh)
+ echo "0000:6a:01.0" > /sys/bus/pci/drivers/vfio-pci/unbind
+ echo "" > /sys/bus/pci/devices/0000:6a:01.0/driver_override
+ echo "0000:6a:01.0" > /sys/bus/pci/drivers/idxd/bind
+ echo "0000:6f:01.0" > /sys/bus/pci/drivers/vfio-pci/unbind
+ echo "" > /sys/bus/pci/devices/0000:6f:01.0/driver_override
+ echo "0000:6f:01.0" > /sys/bus/pci/drivers/idxd/bind
+ echo "0000:74:01.0" > /sys/bus/pci/drivers/vfio-pci/unbind
+ echo "" > /sys/bus/pci/devices/0000:74:01.0/driver_override
+ echo "0000:74:01.0" > /sys/bus/pci/drivers/idxd/bind
This series is based on top of the kvm/queue branch.
Changes from v1:
---
- Move the functionality to discover devices from setup.sh into its own script (Sean)
- Omit the patch which automates binding devices to VFIO (Sean, David)
- Change title of cover letter (Me)
v1: https://lore.kernel.org/kvm/20260409015139.2800185-1-jrhilke@google.com/
Josh Hilke (1):
vfio: selftests: Find devices that have VFIO selftest drivers
tools/testing/selftests/vfio/Makefile | 1 +
.../selftests/vfio/scripts/list_devices.sh | 22 +++++++++++++++++++
2 files changed, 23 insertions(+)
create mode 100755 tools/testing/selftests/vfio/scripts/list_devices.sh
--
2.54.0.rc0.605.g598a273b03-goog
next reply other threads:[~2026-04-14 23:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 23:09 Josh Hilke [this message]
2026-04-14 23:09 ` [PATCH v2 1/1] vfio: selftests: Find devices that have VFIO selftest drivers Josh Hilke
2026-04-16 23:35 ` David Matlack
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=20260414230943.41198-1-jrhilke@google.com \
--to=jrhilke@google.com \
--cc=alex@shazbot.org \
--cc=dmatlack@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rananta@google.com \
--cc=seanjc@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