From nobody Mon Dec 1 22:34:46 2025 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (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 D5EB8342505 for ; Wed, 26 Nov 2025 23:17:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764199070; cv=none; b=MqUKGTvLJzyPEQIyfYqGMqXseKpFSbAv39e3XZ1HVQUZKAr5lKEKCc4a+UzBezpYv7vDnG2BBydHLeXkwxVxnlGQTapEi3JESmWIhWWNXy1xpzO20I2lqm0cJYt9AcjZ2Qy80q+mGQvKHsNIKFfjrTS8OpduJDuWPDnUmsYmTPg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764199070; c=relaxed/simple; bh=5C61XC0qEnL5WHxXy1SRysK/ERPDMiRaWEn4cSWUS30=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=XEBrLJaY3xp3HZtHMS//1oP5HMDEbQq9rDN4Tsy/ZxukOKi0gER2t9GSoBaS2sAChDKDj7L7O4SEg3ucP/X0TYdUTNSxbg4dPRiu9VO7nVALSePggCN81qJyjJ/SsgJ+A0FvlAb7VEDYFBRaH61MyVEfqcQk16QuUZvKp6xkVBQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--dmatlack.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Y4zGYOnn; arc=none smtp.client-ip=209.85.210.201 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--dmatlack.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Y4zGYOnn" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-7bf15b82042so286001b3a.1 for ; Wed, 26 Nov 2025 15:17:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764199068; x=1764803868; 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=+OCk24PhXU3C7aoKD1gVeOiWKi7xUeXg11i69m3P0wo=; b=Y4zGYOnnGhx8+siXK2IqhVVAVuPxgHzDLFLGhVWXQkK8aLh7MLuJJ8ziilFR0vYda+ +mU8rGcfCuZWa3Hj0hxX0hfB0QWdlhwXB63f2F7jpwjAPgy46jkq9OinlWssIGKYVS0w yEzADmY9N63wm9wDQe0/7tFpN2DVAMGQBsJg8GriutIVgBM1UZRBonX3Q07hacJphDx/ V4Zy71ZrLajqIz7DnPuAL8Hc04OczaylolGjSo4AwgULf+w0riTvED0Qx+KdzJttEcEK Y5FNpE8bHQ8/AkYhGbyUVeGavoZcGNQbYsCQnPW954GigGKjtcgGcdVQLTGyk1k5JPti HtLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764199068; x=1764803868; 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=+OCk24PhXU3C7aoKD1gVeOiWKi7xUeXg11i69m3P0wo=; b=iCyvtjU9Cfwrjz5rjOpNhja0t34cnffWnbddj031zam/kc94ZNLsZHSCPgiom/iHuq 1aTXVEA1yJDTGnY9cMzPKcZg2Qf5g2/sOoZzSxIjgd620nOAOXGye7xzge41HATzP1/z LwBcg10bCjC9HhiwYAwN0/rGUuvjSxC2TTSTWC5bq79loQYR4fldXCZhhXxYMRoUQp6X B5rIbotIkPbDDI2cZACyMm+BW5k8vHXkq6Ib52LIMSKOhDrau+ndYwE7P7QYA8sLKgyw Z0UK6VUDPIYDcH57l/BjUgQ3RYG9jK5sQFjsh+ZQv9DD5KUXS+IeHe14IJZS+QI5jKS0 mo8A== X-Forwarded-Encrypted: i=1; AJvYcCWzNVwKe1+w2QpeR7GwYWWvE+t/XQsYGs19kS9HBXihnNE8FPDeHz91U4+V6zYzFqV1lbpqp4trGGTpNf4=@vger.kernel.org X-Gm-Message-State: AOJu0Yym+vb6Km4Rq0ZjiMoYpnLMZFQ2FWBRK0FutdMULwEa+1IrGOZp XQ3Xcmqy59xHUoO1orRd1rQMH4Bi5loGqQLaIX7TK7CqtpTwseELiCefSYd2EFlWjxIv0Izx7op cq2oE+TIq+biZjg== X-Google-Smtp-Source: AGHT+IF+xlP7ilrt+htOcnUs4big4RY44y1Js5GB/kUN9mSS+cwiEmujjBuGxBoHOGncm0qXFKcnp96ynaItZQ== X-Received: from pggr18.prod.google.com ([2002:a63:d912:0:b0:b98:d6e8:a405]) (user=dmatlack job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:729a:b0:34e:1009:4216 with SMTP id adf61e73a8af0-3614ecbf58cmr25661817637.24.1764199068139; Wed, 26 Nov 2025 15:17:48 -0800 (PST) Date: Wed, 26 Nov 2025 23:17:19 +0000 In-Reply-To: <20251126231733.3302983-1-dmatlack@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251126231733.3302983-1-dmatlack@google.com> X-Mailer: git-send-email 2.52.0.487.g5c8c507ade-goog Message-ID: <20251126231733.3302983-5-dmatlack@google.com> Subject: [PATCH v4 04/18] vfio: selftests: Rename struct vfio_iommu_mode to iommu_mode From: David Matlack To: Alex Williamson Cc: Alex Mastro , David Matlack , Jason Gunthorpe , Josh Hilke , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Raghavendra Rao Ananta , Vipin Sharma Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Rename struct vfio_iommu_mode to struct iommu_mode since the mode can include iommufd. This also prepares for splitting out all the IOMMU code into its own structs/helpers/files which are independent from the vfio_pci_device code. No function change intended. Reviewed-by: Alex Mastro Tested-by: Alex Mastro Reviewed-by: Raghavendra Rao Ananta Signed-off-by: David Matlack --- tools/testing/selftests/vfio/lib/include/vfio_util.h | 4 ++-- tools/testing/selftests/vfio/lib/vfio_pci_device.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/vfio/lib/include/vfio_util.h b/tools/t= esting/selftests/vfio/lib/include/vfio_util.h index 0b9a5628d23e..2f5555138d7f 100644 --- a/tools/testing/selftests/vfio/lib/include/vfio_util.h +++ b/tools/testing/selftests/vfio/lib/include/vfio_util.h @@ -50,7 +50,7 @@ VFIO_LOG_AND_EXIT(_fmt, ##__VA_ARGS__); \ } while (0) =20 -struct vfio_iommu_mode { +struct iommu_mode { const char *name; const char *container_path; unsigned long iommu_type; @@ -166,7 +166,7 @@ struct vfio_pci_driver { struct vfio_pci_device { int fd; =20 - const struct vfio_iommu_mode *iommu_mode; + const struct iommu_mode *iommu_mode; int group_fd; int container_fd; =20 diff --git a/tools/testing/selftests/vfio/lib/vfio_pci_device.c b/tools/tes= ting/selftests/vfio/lib/vfio_pci_device.c index eda8f14de797..4a021ff4fc40 100644 --- a/tools/testing/selftests/vfio/lib/vfio_pci_device.c +++ b/tools/testing/selftests/vfio/lib/vfio_pci_device.c @@ -713,7 +713,7 @@ const char *vfio_pci_get_cdev_path(const char *bdf) } =20 /* Reminder: Keep in sync with FIXTURE_VARIANT_ADD_ALL_IOMMU_MODES(). */ -static const struct vfio_iommu_mode iommu_modes[] =3D { +static const struct iommu_mode iommu_modes[] =3D { { .name =3D "vfio_type1_iommu", .container_path =3D "/dev/vfio/vfio", @@ -741,7 +741,7 @@ static const struct vfio_iommu_mode iommu_modes[] =3D { =20 const char *default_iommu_mode =3D "iommufd"; =20 -static const struct vfio_iommu_mode *lookup_iommu_mode(const char *iommu_m= ode) +static const struct iommu_mode *lookup_iommu_mode(const char *iommu_mode) { int i; =20 --=20 2.52.0.487.g5c8c507ade-goog