Message ID | 20240923223522.1203691-3-witu@nvidia.com |
---|---|
State | New |
Headers | show
Return-Path: <kernel-team-bounces@lists.ubuntu.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XCHrt4WNJz1xsw for <incoming@patchwork.ozlabs.org>; Tue, 24 Sep 2024 08:35:58 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from <kernel-team-bounces@lists.ubuntu.com>) id 1ssrel-0006vA-3u; Mon, 23 Sep 2024 22:35:47 +0000 Received: from mail-bn7nam10on2070.outbound.protection.outlook.com ([40.107.92.70] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from <witu@nvidia.com>) id 1ssrej-0006ur-MW for kernel-team@lists.ubuntu.com; Mon, 23 Sep 2024 22:35:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jrchE9BuEnlFPgGrZxLDPM0gaxcLY1Ln5K1suaJgELVMRH4m7fqGjwe9zu7Oa29zz+aqvmxd+743O/YOLALOrCcrhAzhq4lRc5Hyi0CqIhjIFZYPJqdd8/cdLo2eX8+F6DVyHZ4XiaJ7HkXfRWuZ6MUC7m7tEfmW+nHblKl6LocSZa7nqnGclOosH+sEiqri02HKWVj7rZE0J5ULtWcj2zVY9hjpDUbDLQnfBvArbPSfjJcm8yTVnihhrPaZXIe/SUmdWHbPSXsfcu2Cwh6HH7NB0IGiE82h/fLSJ1uaP9rsKCIGL4cI0QMcAiB/3CEtXOSSOrJGZD3xVjtoaDr0Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/+7ietNGkQpJ/+qv+kMqUKaUn+JbRevpgh6l90Kz4AI=; b=nB2+Tdw4awXZGqtZsM6YauTcHSx/an3Z3L+Nz+Lg96r61S2RrHKCtrKCU0MHclEVwt2L9j4twhJIfHRHHqL8lMXPvylBcyBdf4gVm3nx40u0e/5divYfX8GVUupBkb2/gWJWf1AAtJQ1soRWnkqW5p1iKmFe3Kg7N7/mci/4+O2+fWpHOtD7r+y5LdFcIVnBto2xN6iea2VW5kL/l/EdS8gPxqf/s/45MOSiadTWOY6SsXHnzFwg2P6mP+Mv5KJDKFVIkQYQwVQoqBSmYxI705AnyJUAIk+JuLRx47UvxifDRaAwsc2nEWd0wA1CZJKk4vLbEnQ1vUjTy0oso3bgHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) Received: from SA1P222CA0153.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:3c3::17) by PH7PR12MB5653.namprd12.prod.outlook.com (2603:10b6:510:132::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.24; Mon, 23 Sep 2024 22:35:40 +0000 Received: from SA2PEPF00003F61.namprd04.prod.outlook.com (2603:10b6:806:3c3:cafe::de) by SA1P222CA0153.outlook.office365.com (2603:10b6:806:3c3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25 via Frontend Transport; Mon, 23 Sep 2024 22:35:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by SA2PEPF00003F61.mail.protection.outlook.com (10.167.248.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Mon, 23 Sep 2024 22:35:39 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 23 Sep 2024 15:35:29 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 23 Sep 2024 15:35:28 -0700 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 23 Sep 2024 15:35:28 -0700 From: William Tu <witu@nvidia.com> To: <kernel-team@lists.ubuntu.com> Subject: [SRU][J:linux-bluefield][PATCH v6 2/6] UBUNTU: SAUCE: vfio: Add vfio_device_get() Date: Mon, 23 Sep 2024 22:35:18 +0000 Message-ID: <20240923223522.1203691-3-witu@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240923223522.1203691-1-witu@nvidia.com> References: <20240923223522.1203691-1-witu@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00003F61:EE_|PH7PR12MB5653:EE_ X-MS-Office365-Filtering-Correlation-Id: 6342de4c-e6ef-44b0-02d4-08dcdc200d40 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: I1Ml7VTuoCv0Y53OnL5XkAsWQ+Enz9harB1XJMNsm4xGP880rC2kOT5o4q8bSf0JDv0MxW6ikBxpzockzUwfl4F7ypzKkFGaFAvmfQlYmh0KPJxHVsWUoLRCymsXDwvli7sKJNqhlGbeVPnAqplEL8qwzpM1svopbujbv6lJb8gzxfNL/ojrCHQUH14naOB0Apcmoa6V6vnuFyLyjT8iaS7qYl1WKdFocAXG8HTKNWil/GKtjarDzb+w5n5bFL4mBny6NPNO0acRrqYwAef7FDtHvMKICTtZqY69Cl8+YIpBsAD3DJDLpXGySFujdnP9EQoVYEKqf5yg99jIGRJp2FmU/BFDnaphc8uoYbBfPvB82fGSbS5djjqj13KFUSowm6Fhz+iHnRP32X2ei7WY5npmVkx5BPUu4VibodiAuVRx74id2koFW5JxnlcyKIjeEBTGy3gMveNX248uIY5x0A+QPUnPuk38k1vMeJfnFQdCW1tNwd6zDzHdaaGyW6v+HjBfzpmGxnAoGEZ6zMgZZektyDrEJEurxE+4FGfL5b0b6hZsKTXZqGMfGe08yRoXxxZxuDm0GAF5GcF7feBf5dd+vN5wcr8GUHBKr8DTwIfFsWoEjKtRncexgkiNsYXb6kLpuG0RTmleTPPSlVEzgbinfhQHjbN9W4GcBptx/7Yf+1vQa0MO72ffDpTvkiyXl0R0VlDz98t5V8mQ1tKOPO0uCTy6skpwOVJEEkd7QpOdAP3TTcF/6hOE+bpMr0hJM55/Vv76fPmyRjZwlRAj92D6A4rgFn9CRA+VZBvgp1RaC1o0AO0H6f9aKX4Nz3x6XJJFTFljTpWtzHU/0LN3wNdJGyHIXezDYioNAFBZnLIa/NEUVfcY0gsgc36YG7qWc1mrxKxBhDeKZ9ahLHgiFGv5MRsanDdgddvL4MuaxGu8UUkt54hiyEexr3eFbd+1/Oat0/W84G8GjaSE4OsZXnItu8fdWTXUhA2fe6w8ffSXZv/yUCc8XmzA14UfafKadV36RcKukt5cvqtxHAlXDmYImODsYKgOAVmHusl90QI2RvU676kMoV/mMqIICvETqcK+REYh8+UgbA2TE/VX1ezLFI1DTnSc/zk/dyh1PgZs7N6GUh0aBBVxnH+rvIhuTQm2UE18sViqW2ZJxMNz4HzYeXiKvB9BehTuXei1jeByqpppmjDZSGCqa69oI9NcH+9IG115nd9a7SqKbI1jNWUKYVTLtu77KfHurqpsj+ckaInZSa4M+VqeZi2Z27iYwM6QQp93x6ojTVsmJ3RjkMaJbq+DKXM05FtGsvrky/QHeHlzY8VZastZ9CCN9dMgNScTHAvy2u/jpuD1/zbfB8P0ltSY01ePWeXPvSjtDVOjwGXDvqiFqD95b6SkwqaPD4E/h61sxCOZ0SBFrtYBBulVhiCNwPp41lkyrPR9tXEwgGa0Ji6Gkqsj7PkDgo9z X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2024 22:35:39.7880 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6342de4c-e6ef-44b0-02d4-08dcdc200d40 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00003F61.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5653 Received-SPF: softfail client-ip=40.107.92.70; envelope-from=witu@nvidia.com; helo=NAM10-BN7-obe.outbound.protection.outlook.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions <kernel-team.lists.ubuntu.com> List-Unsubscribe: <https://lists.ubuntu.com/mailman/options/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe> List-Archive: <https://lists.ubuntu.com/archives/kernel-team> List-Post: <mailto:kernel-team@lists.ubuntu.com> List-Help: <mailto:kernel-team-request@lists.ubuntu.com?subject=help> List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe> Cc: vlad@nvidia.com, bodong@nvidia.com, sergeygo@nvidia.com, jgg@nvidia.com, zwaksman@nvidia.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" <kernel-team-bounces@lists.ubuntu.com> |
Series |
Add VFIO P2P support
|
expand
|
diff --git a/include/linux/vfio.h b/include/linux/vfio.h index b7275ed44e4c..071cea3871c9 100644 --- a/include/linux/vfio.h +++ b/include/linux/vfio.h @@ -82,6 +82,11 @@ void vfio_unregister_group_dev(struct vfio_device *device); extern struct vfio_device *vfio_device_get_from_dev(struct device *dev); extern void vfio_device_put(struct vfio_device *device); +static inline void vfio_device_get(struct vfio_device *device) +{ + refcount_inc(&device->refcount); +} + int vfio_assign_device_set(struct vfio_device *device, void *set_id); /* events for the backend driver notify callback */