From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.197 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796338867; b=yjuWzmspE8Ce7MHrSrDmgNT+aIqmXD/tjRf8hnDJsPwsB4Mc7ZOt+B7toATeMMRBgzJD w663FkUUzlL9r79NsbNMV+Vugb5TZIMGtrpSaJq3vvT49hSiJgMAF4ms0egXbof5Hkk/Q La8yG6SgCnJC9mUUy1sFPCJ+KtVQat+LVolBXI2dZjOIiuPjXlJthpsWU4wcUExaP1zXD agDWm2IR1tr2Pw2Euk/dsw/r9GlWye39Go0tBPGRrn1Omxp4SoFy4uyB+o9TdknEQFSIt H5EKCTKPsz32aDeu3u48DCzigQMRSOcgv+2vFQkrK0P9A809Skftk/4g/EMOlxEKKHQ== 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=hcAU4YBE+qM0VQwIOU3hjJYK8VHTQQFIAWiXUBtMKKrV1nngZMnp7f4UkcIbRFBHxCGy 6IfCUClZgZ9negPZnbj44Zr32j5pFZc8sqKUE9Njw6fTjXOsI9WC+OizWHD6avFhGhcmf AbeVChJAeXoxR3zsdqXBQCqdM5YQDou6i9yTy65QW8EnMAh0CbKxzyYtEALZoapeZ23SV NaBCytJgpxHF5H6og5jFeNm1Jm0hMLdyP05UI/iZVzzXCnM88QbeNog9J85vVnhcdBN7o u8jFz+yFfoSCnU+rc0DOsqcq9VF605dcEY9A1ooqn2M19x70fLv/zUyC0WBMy2fOV1A== 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.197 Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.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 8C699606A322 for ; Thu, 3 Dec 2026 23:01:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8C699606A322 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-f197.google.com with SMTP id 41be03b00d2f7-cdebc913d7cso193136a12.1 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=Pzcg4JIeTgZmZLJZa/448cC32qSHxQWKcArQ6AIiqyU4kcNamfAZz+vrQ0hw0MmQzh yr6G1mte6FTOMTJLvc7kAVcMfzhDHFaIRo1BFaIdAneM8aCyzs+kP5gjyf6zWUED4dGw zGRHSb2xrjv0m6CPmHwlt75uabCNfKchWOaP0RcwweMP8G/81hpoS+evjnuBw10PmsuI t49zo5UKtLXr6e1d6N26KVrqDzE1jQjI2k2zOGrgXcRNF7UL+1m/M6A2iz0h82E38Ujj Uj17ZvC0HyrZapATXy2Ak5yj3OxDqVKnQrZ9eU3qR/R4XvUw4ukr0AJ6HwuIlsK35rKa xIeA== X-Forwarded-Encrypted: i=1; AL+hErHw0elj7j34DrcqtGJ4zL43hsl3LWAyyO282GImzqJu1syI3Bx96+QNogtUO+Mp3bl2wR3PPWpIEFl96qk=@vger.kernel.org X-Gm-Message-State: APuU4Z/VkpttoqJPiDBXSDznGj+CiLKEWrQF7J26859BDzOGk1dPYndL BJhC7BBdLnRILfnRtYdUE9+hC6RDIazZA+hXmH/IutPrq3qaneREjgbhkGTViib40XtMZmLl1hQ Ardx+H3jG 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: 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.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