From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f202.google.com (mail-pg1-f202.google.com [209.85.215.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC59237BE84 for ; Fri, 8 May 2026 18:17:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778264235; cv=none; b=NmzASNm/HLzZUN0vQJMcPiKgyofj94sKfwLaisNvsuMVPL+PYpcdJb5FsBeWQ10XCWHHvuDZbIdnD/cIjdSHaLXDFgWi9w7Ncf1LzzTwPRw39+tIej5mxuKNT1dWdx3jFOaD0XfeFJttfR8TM2L35CteY9FeEyKvyERte6P4oMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778264235; c=relaxed/simple; bh=tVeBTBMarQaA7cDl8Bnbve0BHEZ1LCYSi6e8kRgFrps=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=HtPkH66U8WvdIJV1YbFELtPWzPo9qYc+VKmkIcIddg0dVz4/mbwUcyPN8aNtrnd7Rj2aTfJTQYxLiKT+vK7HK4CNg13Z0j0Mg++G5EmORCXcAIZtBb5Al0K7BDTlymfzOhLUs4ClEdCaPk2EQkzcIps1YDZcL8Lgxb4zlQRI94M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ByyA0tI3; arc=none smtp.client-ip=209.85.215.202 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--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ByyA0tI3" Received: by mail-pg1-f202.google.com with SMTP id 41be03b00d2f7-c8271fb4407so11368a12.2 for ; Fri, 08 May 2026 11:17:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778264233; x=1778869033; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=HCYkJG0gtD5JkM6uE8YeEJnNDMm/eOHj+QJQbAMo/F4=; b=ByyA0tI3clBP/mi87f9242Wd4ba9+Cy8j0tyqgoJ3QFDFT4s+S/b9JHl0iWO1GYizZ VFocPKt0gtF9xLhwmpbKjaOHZXu4rXayzWsfqYdIgRUim4cBPd+52BgO2PGlCnOqiYYX zW1fsSTjMZOC9IS+l/FJsDAKjWRxIlx50utZu5moLG9UMFq0hB1TV1xyjszRmt5ZBWI7 OTQeYucNdBtJD8GAcFsobuPeXoY8Ep+J05o3QKxWmSoBpbhvLTXXpikZX8eojsjtwtP6 Qjra3T4Ea9kSfzFlU/ZzzAlbT8kzdC7JOO/4U6NpV0/ASR/Em6Ilk/9IDFykePwcMsGA Idjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778264233; x=1778869033; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HCYkJG0gtD5JkM6uE8YeEJnNDMm/eOHj+QJQbAMo/F4=; b=jGB3EBBo2XtmUnKR+D+l/VKOYs6tJ9c8kuULlXcI6TbpxvxX0UCnosuqrTqNeFdn+t nLl95FBvcb06+zXIL6MQg3gpSAp4ouF0jG6ycj4wNyfDoMRrWHKE0uuRvRXfsJj+IJM2 Fv+oq8F1zZ8vnxQHn3J8WJnZVlGGxbfDH3cqLhzOEvORWFzTRGJWisDnilcZQN3pCIJX y3LiMcE/pRwazoXNJZpLWpKOE/ND7pAE7Pi1SRt5cjZJdnlNmd4sKBsORZMRZyp4ZB0k NmHG5PrwMy7Md/TEcTaRgD4py9buACPUm1Rcj1lgawGWm5JP5mvQwZoeVukbTt+rYqw6 UU8g== X-Forwarded-Encrypted: i=1; AFNElJ+h4m2auFPmPzVcDE4jtRwQXOcjy/ZwRlFPXBlLMQq6UrHy4EqMU7SaLvwx4Ma9JLgiIBt7qFkQzISrh10=@vger.kernel.org X-Gm-Message-State: AOJu0Yz+SkH2OT9MWg9bzSZEWt4KVTmQArFQrDU5+DpUPa9C4dhN1DLk aCQ3hfxmHp5rSyBmqGEXoBVD6z8kx/gZ1wYP31WW6ApeZPPMRryfOrE8ISRs+MwEqLeRvKV2V2h 0JNIlJQ== X-Received: from pgno26.prod.google.com ([2002:a63:7e5a:0:b0:c81:2646:5294]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:5493:b0:39b:d937:8010 with SMTP id adf61e73a8af0-3aa5ac011e5mr14816254637.45.1778264233154; Fri, 08 May 2026 11:17:13 -0700 (PDT) Date: Fri, 8 May 2026 11:17:12 -0700 In-Reply-To: <20260414230943.41198-2-jrhilke@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260414230943.41198-1-jrhilke@google.com> <20260414230943.41198-2-jrhilke@google.com> Message-ID: Subject: Re: [PATCH v2 1/1] vfio: selftests: Find devices that have VFIO selftest drivers From: Sean Christopherson To: Josh Hilke Cc: Alex Williamson , David Matlack , Vipin Sharma , Raghavendra Rao Ananta , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Tue, Apr 14, 2026, Josh Hilke wrote: > +# Print the segment:bus:device.function numbers of PCI devices that can be used > +# to run VFIO selftests. > +function main() { > + local vendor_device_id > + > + for vendor_device_id in "${DEVICES[@]}"; do > + lspci -D -d "${vendor_device_id}" | awk '{print $1}' For ignorant people like me, it would be helpful to capture what device was actually found. I mean, I don't necessarily know exactly what these devices do, but as the list grows, at least having a general sense of what device I'm going to be feeding into VFIO would be helpful. E.g. something like this (ignore my terrible script skills)? #!/bin/bash # SPDX-License-Identifier: GPL-2.0-or-later # List of devices which have a VFIO selftest driver DEVICES=( "8086:0b25","Intel SPR DSA" "8086:11fb","Intel GNR-D DSA" "8086:1212","Intel DR DSA" "8086:0cf8","Intel CBDMA" ) # Print the segment:bus:device.function numbers of PCI devices that can be used # to run VFIO selftests. function main() { local found local i OLDIFS=$IFS IFS=',' for i in "${DEVICES[@]}"; do set -- $i found=$(lspci -D -d "$1" | cut -f 1 -d ' ') if [[ -n $found ]]; then echo "$2 ($1) Device IDs:" echo $found fi done IFS=$OLDIFS } main # ./devices.sh Intel SPR DSA (8086:0b25) Device IDs: 0000:6a:01.0 0000:6f:01.0 0000:74:01.0 0000:79:01.0 0000:e7:01.0 0000:ec:01.0 0000:f1:01.0 0000:f6:01.0 > + done > +} > + > +main "$@" Why pass along args? The script doesn't actually recognize any arguments. > -- > 2.54.0.rc0.605.g598a273b03-goog >