public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
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>,
	Raghavendra Rao Ananta <rananta@google.com>,
	kvm@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] vfio: selftests: Automate setting up devices for testing
Date: Mon, 13 Apr 2026 08:07:20 -0700	[thread overview]
Message-ID: <ad0GqAsFpAgA6g5u@google.com> (raw)
In-Reply-To: <adl_nGI5IEc815fb@google.com>

On Fri, Apr 10, 2026, David Matlack wrote:
> On 2026-04-09 01:51 AM, Josh Hilke wrote:
> > Update the VFIO selftest setup script to find a device that has a VFIO selftest
> > driver on the system, and set it up (i.e unbind that device from its driver, and
> > then bind that device to VFIO).
> 
> I am leaning toward putting this behind an explicit flag (maybe -p for
> pick_device or -a for automatic device setup?) that way we are sure the
> user is ok with letting the script start messing with devices on their
> system.

In the spirit of "do one thing and do it well", I would rather put "discovery" in
a separate script entirely, and then tweak setup.sh as necessary to allow piping
in a BDF from the discovery script.

The mechanics of configuring a device for VFIO (setup.sh) are largely generic,
i.e. not unique to the selftests, whereas print_supported_devices() is very much
tightly coupled to selftests.

And with respect to making sure the user actually wants the script to mess with
their system, the permissions required for each script can and should be different.
`lspci`, and discovery in general, typically doesn't require root, whereas most
systems will be configured to have things like "sriov_numvfs" writable only from
root.

  reply	other threads:[~2026-04-13 15:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09  1:51 [PATCH 0/2] vfio: selftests: Automate finding/setting up devices for testing Josh Hilke
2026-04-09  1:51 ` [PATCH 1/2] vfio: selftests: Find devices that are compatible with VFIO selftests Josh Hilke
2026-04-10 22:40   ` David Matlack
2026-04-13 22:57     ` Josh Hilke
2026-04-09  1:51 ` [PATCH 2/2] vfio: selftests: Automate setting up devices for testing Josh Hilke
2026-04-10 22:49   ` David Matlack
2026-04-10 22:54   ` David Matlack
2026-04-13 15:07     ` Sean Christopherson [this message]
2026-04-14  0:15       ` 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=ad0GqAsFpAgA6g5u@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