From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.197 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796144932; b=m7rHAQjNR17UYdj8Z/vE63g1VdrZPqKiTFYtweAG1sbt7Gz4qHwzc3y5Du4zCrb+1qJK Ao3rLladoeTMC/R+C1bajyv7ZqvboX4XvN4Cp9yAM8EHSaRJdcyC424IttOpgNBb2WKfs t1/gYofajwNi2XwBsMqbIWFDEMhrpUfjEUHydWyNru29A6E16+P4Fm1ScwWKGkdW3AaJL 90eBuSahmtSl5SpmpmeQw9g8hWhu8Lur5NauYWez3R4gVykOGFctCmIYZKZoZJohQk0lU aMNje56lRn7W3vPPR5fu+RJhx+TyAwQwG4bq94NaG8RRS//qWHPhJ+WrjkhOSLdmYoA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796144932; 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=S/GY0T9ridP2sxPfWGG2Dy7jN5WiKDmNgMx1nvI3UXM=; b=Vjx3S6xrV+chm8GuRAZG5+ZNmFO/m6IvQ6hThzLssGnpFSxeI5FwiZ70DqxJMXHrQ/5S O63XyH3fiziObdBOH24kC7LMk5DnxE8lA1Mi3K607fHz2dfHfIEaVhP9oHSzpikCBP164 U7r/gNuH4gWkzo3WTCKHiNUAMqKgWLrYXRp76KFLei1f9soQUZrMEenWdpUDn9lfiENdr b0SsRD449oTvvMtVDHujBiGH1BAVyDlpXHPd1DRLr+LQw3FVzNd0Tz++atcuWGDZR5fEh rvOZM9agTMrrwa3rfHeS9tmsjpVPde6LWajWFkAoLKtLCFnAMUMXLsu2Hl6j7TFwrXQ== 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=ojWCLD2Q; arc=none smtp.remote-ip=209.85.210.197 Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) (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 B79ED606A339 for ; Tue, 1 Dec 2026 17:08:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B79ED606A339 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=ojWCLD2Q Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-8b691cf0eeaso14039335b3a.1 for ; Tue, 01 Dec 2026 09:08:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796144931; x=1796749731; 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=S/GY0T9ridP2sxPfWGG2Dy7jN5WiKDmNgMx1nvI3UXM=; b=ojWCLD2Q16WJWHtnoospaMnHYpygLfHtXyWWfThNkuagGAcY0NQDsgyQIY8mIDf5K2 IuM5JcRdSCBDZWa0uA43bYSuG1FQzCGfRkDZPZKd7+zjI6oGWUY+mlW2vUlVuwTEX6eX 2bHWv9sMf2FqRjEyGz+9n/BkXGTHTCnPVVIiiGIa0WsjsiUSg+Q8x4KEAG8H/edRO4mT rXxxDz2SzoKtKq6WgJSn1hfQ8J4XL+dOJBsoC6XnbBSscZGa+NoX2Y9XTWkiHEY0SXq5 r089htrltqmXWjX0uItFcF7S2v5KPxFh4hy2InrvAwDlPgMIPQ50hdvz95U8Mml/8UFN CfrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796144931; x=1796749731; 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=S/GY0T9ridP2sxPfWGG2Dy7jN5WiKDmNgMx1nvI3UXM=; b=E3eDOfQgGqbGUM12b9oHsc0VgqTWMnRuXgohjcZWaI/IzKYalrGQw5zmDQD9ecY8Ze VVaThkSqyxuwYHg0+yQOZJ/J7xO2Bdzz7O1we0oji1iDRmMoAFUMOfVaXgpqz5ng3SjO plvk+8tB5y3ePxOoj3A06V+cgAgkC6Nu2rCRyTijq4Fk52OxHXFIlKwM/htKYang34DA fqEZ2W1mP56Rtf2KD8alxZzb6JtlqYPumjn9xBRKg5NCqZXF9eYP9xDCLpQTshEAAlrp mo9ZDu8xAGib5dvizMR3qzWkXJNpJAAn5Z69g3eHFh1NQvqFys6ex5SYPfoUp6eJQvuV n1HA== X-Forwarded-Encrypted: i=1; AL+hErGbYIDkK9birolRqmVS+lVCM4r6AJBnKbt0O1X2z5y4FyWcyThePSmkZ0w4WB/5o1g2JUoUoFH4pplI3gs=@vger.kernel.org X-Gm-Message-State: APuU4Z9DOOi7dAQab/G4jVaQwXgIqCciK1s/8UOe8XZSOSXUgidvJD/A qU0KjxewkCI3QNqwo/zmotItdsAnTGTW9OjOiNre0dqdWT25Sfs4aZ1raQ8+C4rzwImeG2uSVdu 1w5yS0Xej X-Received: from pfak11.prod.google.com ([2002:aa7:92cb:0:b0:891:b886:dd4b]) (user=jrhilke job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:2e91:b0:8b5:f313:9f40 with SMTP id d2e1a72fcca58-8c87d322aa5mr35992202b3a.49.1796144930659; Tue, 01 Dec 2026 09:08:50 -0800 (PST) Date: Tue, 1 Dec 2026 17:08:47 +0000 X-Mailing-List: linux-kernel@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.839.g22a8290db9-goog Message-ID: <20261201170849.296378-1-jrhilke@google.com> Subject: [PATCH v10 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" This series makes it safer and easier to find and set up PCI devices that have a VFIO selftest driver: - Patch 1 makes setup.sh refuse to unbind devices bound to a driver other than vfio-pci unless -f is passed, and adds -h. - Patch 2 adds list_supported_devices.sh to find devices on the host that have a VFIO selftest driver, showing their selftest driver path and current kernel driver binding, and updates vfio-selftests.rst. Changelog 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. 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 | 306 ++++++++++++++++++ tools/testing/selftests/vfio/scripts/setup.sh | 41 ++- 4 files changed, 363 insertions(+), 10 deletions(-) create mode 100755 tools/testing/selftests/vfio/scripts/list_supported_devices.sh base-commit: 076d7e989cb69f6ded7d60f2a080eb909930061b -- 2.56.1.839.g22a8290db9-goog