From nobody Tue Dec 2 01:27:32 2025 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.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 9364F351FBA for ; Fri, 21 Nov 2025 18:14:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763748887; cv=none; b=I4BxQ+IvSeGa3iprdWM8jG4urErG0K5EEW5JwExwyHUZw8GA5iRB3cGA9emUyrTKsCwj2p/LPvRQVM9S2+TEJRhm6Q/9sZxvF93LKnqJKatYzIVeYAJbucL3H9wCYqwYyJnGbqM0wYEjrVg7KMbT8yo7z0Yqmi2W8JpXKXdnmac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763748887; c=relaxed/simple; bh=0mpt9DrK2EH+/nszyWzaz56fSuMqVTW+MCo2D/grwGY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Ab03fy9o5QKkIC91Hr64Ivkr5UcJCHchx8c7+RxloPuSqLcVMVcGgfL9sT02sPiEwGT4K+Uo11cy4YVTffPGObH5iNYNBa74fWYbprCdfu38VFsbRTDjONC8NPq4qvuCHHAh70W7lVyYeKLQk6h7OeN+UNGj4ZU8XaeorWBoll8= 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=fCQdLYwT; arc=none smtp.client-ip=209.85.214.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--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="fCQdLYwT" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-297f587dc2eso55120815ad.2 for ; Fri, 21 Nov 2025 10:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1763748885; x=1764353685; 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=JxeIo10ZephNiFDx/n6CiZynZejR6x/fiOnvLqPApOE=; b=fCQdLYwTUHNraYZFyFT7SgERnZENyfiIY5r6nUNnn53rGLt9of1C/nVbKFBg2V+v22 zu9njHADo7KN3ROjSimIsKfFw7ra392HSTLbzhyMlKYQ/TIFENQ6AVivl2ysIkYt9Zl5 ynLoGmHWVzEczJY5Zt09jZzC/ticrP9+Fy9eV0ST6v2yUnPxlrpIFQHMsmdtdu7Yty1k ssdKSLdFJW0UHCFPGP9WNubAWeLf0i+zexcEZlr3b49u+FtYtwAHROOVuUMC0j/jTs5w fMsrhAK22hQpTActx2t2v2i09w6RE13bH5de1GryYUtPUBe5oaGKns4Fnqww+UnqCYYc 1wPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763748885; x=1764353685; 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=JxeIo10ZephNiFDx/n6CiZynZejR6x/fiOnvLqPApOE=; b=CC+e+5f7AhwMo1RJKB2Q07M5PMUDAdnS0n8LADMdPq+xpaKVlsMdakNjE2RUbtuzbA QihE2SbAQp68SelI/SW9Z2t43Kz4QGOJ3TvKRE34GEiDmTaqkMaflrJSKwApn/qIsB85 1H2mSL5bfSKPBehlS0iIdO5/l1yaC0Tz/y4UbBmCRUjvDCT+1rKT5Ff+8wJWaAQF5Wa5 FU5LyFvLlCDQM/5EUTR8C2AMM7CwzaG+k344Ppf+Yb5iMHpnVxyYzeA4/ItCNVYLIMbv poUYE6PE8Td3gOUYBW5/SuBUFBkVxApPJevZAU74HJmg0e2U1oorgonBGGkMldG4rUFj ZUzw== X-Forwarded-Encrypted: i=1; AJvYcCUFCYtKCtv+Ditb/Xs5+krbIXctFqjETsUgjfQgM4GxsotuyRgLjjHr8YSpRCQ/lJQfGO2eGAUD9vBM4HY=@vger.kernel.org X-Gm-Message-State: AOJu0Yyq8G8bUGr7TgAAt07jaVWxx44rwnpbnt0vcHa8OIFbxXHDa9fi bqPMFJ+x5xFOHGTjqaINelV07FmY0JWJUiY0RGf+f3e9AC3UWdudjMOKH2grfhydJVUIe2FKYNF 05h3Ru9iwzto/Zw== X-Google-Smtp-Source: AGHT+IFbLTbWF39tJajkynXW4HbedSaaqh39StKC8XEAGbSVy0Ikmggms+4ZG3tLpOCRvQQJzPyHg6COHAgOQA== X-Received: from plbkt13.prod.google.com ([2002:a17:903:88d:b0:292:3da1:8ea8]) (user=dmatlack job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:440c:b0:297:d697:41e with SMTP id d9443c01a7336-29b6bf3b588mr42912705ad.37.1763748884880; Fri, 21 Nov 2025 10:14:44 -0800 (PST) Date: Fri, 21 Nov 2025 18:14:15 +0000 In-Reply-To: <20251121181429.1421717-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: <20251121181429.1421717-1-dmatlack@google.com> X-Mailer: git-send-email 2.52.0.rc2.455.g230fcf2819-goog Message-ID: <20251121181429.1421717-5-dmatlack@google.com> Subject: [PATCH v3 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 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.rc2.455.g230fcf2819-goog