From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.199 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796338867; b=C2l7G9UolD78xYnpqAXg4IbGssiEh0cR1HpuH47O2EvHXKCvvoAhaarlFKiizhKUfPaS wI3e88qXQSmWy3A+o54088e+EaGALlp3SqUMnbmrRhmajh/3BbfUHBfICJYL95Naq6Rtw M9cKA7GrqhPob5O/bB3Ed3a9cQG7nBDu0273+wOp9ARwCus4UfrnHeeoNFVL3jJLZGKCm W6M3IvcMKP2Y9MNmENGWroZsJAN6M4pEPaP+iyjHo8ReteDED30flpqf/jZfFsaT4LWac xYtGgUYt+XoXyuBnbVFl4huSlq1cuLxxnQZiYcrJThdUtnP4C4ZCWchGQNNKeZTKkQQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796338867; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:Mime-Version: X-Mailer:Message-ID:Subject:From:To:Cc:Content-Type; bh=zuQuY1bZtwioU/RpfrVpJDyRuTAKLnjo3V1aVc5MiK8=; b=CP7258i7mVuJEx7AlmpB9KZU4pp9Rg5q4DEg/vlXZJDVP7rilz/ZpeUloGzebLz05k2t /bo7VaFLW+EXlWf33L0y/3qc+wiWgvlezastj4BAn3g/edYd/iyYllbKs9oxJ0octfmq8 UNK/sTXcQW48/oCCywQUitmtSWN3vWsQAAevWa9HbaBF/GYsHeg2AGLSkN1YosC+YgKE2 QSZKU5/colre6re3yD+hz49cuUIeWWfZHDIfaLKwdsFgyZkfBhkaZmwOdd/0wrFgncaUW KUqHiFSvraWRdQnFxsMUqWOTWKIxtpp+tM4PbVbkzdLs9LHj04U7h1Ttd3f8Tsq4Vfg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--jrhilke.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=RmqP9tza; arc=none smtp.remote-ip=209.85.215.199 Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99B5D606A32C for ; Thu, 3 Dec 2026 23:01:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 99B5D606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jrhilke.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=RmqP9tza Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-cdb96533adfso206644a12.3 for ; Thu, 03 Dec 2026 15:01:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796338867; x=1796943667; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:mime-version:date:from :to:cc:subject:date:message-id:reply-to:content-type; bh=zuQuY1bZtwioU/RpfrVpJDyRuTAKLnjo3V1aVc5MiK8=; b=RmqP9tzayB70faoqWFInJXbOKjr9+DcmbPFh1ufBHV52XcEDtX9xy2y70ehaRc/B6Z qjLeOCpW/UakXEsTrxo9i6VYItKZH2/mEKK3KFAQGfrUvpIcNjnY/m8oWg6lHnIyEIq8 n3Du5384LHcXJnkgMgUeTxdENNH/bLQfglgYSnmenXouVPjM9Xla1Sl7FAJUufPJSPpP IAcNc8HoeN6dFXOtse9bmGoZi737Tte6+n2qbX8i1+lmLHloM0TZo5mkeD0cEUOaRdFs PDzxtD9EwdWaXc3ZMVTNAO7QwKx+HmgLvjPjVf2gpUlQO/NlkqzxpfTUfzYFvMNi2Ytz 0GEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796338867; x=1796943667; h=content-type:cc:to:from:subject:message-id:mime-version:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=zuQuY1bZtwioU/RpfrVpJDyRuTAKLnjo3V1aVc5MiK8=; b=OXtthXQ6Yna9eEdvcArdA0AwIGIxHRS5jdnLIvMtXhInqWu3bGnIdeK7K/hYp/hgcu soGPNuFHWTiHolM3t5dQ325X4s87XvhmkVKq3I7k7EihSbTiMu/WME3jJ2BWvvwNjbea o7kuVDyd7xE4M2nzR7pgN4V89JkjPqtAKRS8HGVIDwmQJ5e1nwg2wGAWWKiNvM5bLlcX 2Q5PuUXVY8RcZnBacRC/QTfsrvLvkzLuCU9n6h+d1snJKnriW1QEjeAzUKjvzYVzojOH yKDD4pfhJ/GBji5NIs6pfkIVOVHJFKP7RMw9mKknZ+zB4P2VVvS1yNKsBcO3gfOrYuFj Afww== X-Forwarded-Encrypted: i=1; AL+hErGQOVSidCbHar4rP8/iN/AhEmyOjsA2aM2SHnh5I0jRf2vqoPbqCDeXXN3CR+aVb1tnKsk=@vger.kernel.org X-Gm-Message-State: APuU4Z+eza1EMYMGwxqNmkqrR/3+PfJxyvClqxgWxSMkL7cI84IOaC7I S56UKNCoS21IPOq8GbTFfNqaFMGNDpy7w8S0m1c1vD4VeMJ45DYt6urDpTwybUuaBr1YUfAbKvs h7R9NksXB X-Received: from pglk23-n2.prod.google.com ([2002:a05:6a02:6b97:20b0:cd8:2b49:af45]) (user=jrhilke job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a21:4801:b0:3eb:a628:10ae with SMTP id adf61e73a8af0-4156174183amr222195637.28.1796338866601; Thu, 03 Dec 2026 15:01:06 -0800 (PST) Date: Thu, 3 Dec 2026 23:01:04 +0000 X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 X-Mailer: git-send-email 2.56.1.915.g69d5ec7298-goog Message-ID: <20261203230106.32033-1-jrhilke@google.com> Subject: [PATCH v11 0/2] vfio: selftests: Find supported devices for testing From: Josh Hilke To: Alex Williamson Cc: Josh Hilke , David Matlack , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson , Vipin Sharma Content-Type: text/plain; charset="UTF-8" One last patchset to address a nit from David about verbiage. See changelog for details. Thanks Sean and David for the reviews! Changelog v10 -> v11: - Print "No usable devices found (run without -q for details)" when -q is passed without -a and no usable devices exist, instead of "No devices with a VFIO selftest driver found.". v9 -> v10: - Add patch 1 to require -f in setup.sh before unbinding a device bound to a driver other than vfio-pci, and add -h. - Print the current kernel driver binding via lib.sh get_driver() on each device line in list_supported_devices.sh. - Print "No devices with a VFIO selftest driver found." to stderr and exit non-zero when no devices are printed, including under -q. - Add -h to list_supported_devices.sh to print usage and exit 0. - Use disable_denylist=Y in print_denylist_note() to match is_denylist_enforced() and vfio-selftests.rst. - Add "Keep in sync with" comments on DEVICES and DENYLIST. - Refactor list_supported_devices.sh main() into format_device_line(), scan_devices(), and print_devices(). - Document setup.sh -f and list_supported_devices.sh in Documentation/driver-api/vfio-selftests.rst. v10: https://lore.kernel.org/kvm/20261201170849.296378-1-jrhilke@google.com/ v9: https://lore.kernel.org/kvm/20261120012553.3745742-1-jrhilke@google.com/ v8: https://lore.kernel.org/kvm/20261118064309.219592-1-jrhilke@google.com/ v7: https://lore.kernel.org/kvm/20261106051726.3964374-1-jrhilke@google.com/ v6: https://lore.kernel.org/kvm/20260602222941.3133236-1-jrhilke@google.com/ v5: https://lore.kernel.org/kvm/20260602185615.3025904-1-jrhilke@google.com/ Josh Hilke (2): vfio: selftests: Require -f in setup.sh to unbind a bound device vfio: selftests: Find devices that have VFIO selftest drivers Documentation/driver-api/vfio-selftests.rst | 25 +- tools/testing/selftests/vfio/Makefile | 1 + .../vfio/scripts/list_supported_devices.sh | 310 ++++++++++++++++++ tools/testing/selftests/vfio/scripts/setup.sh | 41 ++- 4 files changed, 367 insertions(+), 10 deletions(-) create mode 100755 tools/testing/selftests/vfio/scripts/list_supported_devices.sh base-commit: 076d7e989cb69f6ded7d60f2a080eb909930061b -- 2.56.1.915.g69d5ec7298-goog