Message ID | 20240925172214.1511114-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 4XDNpx2NBzz1xt0 for <incoming@patchwork.ozlabs.org>; Thu, 26 Sep 2024 03:23:05 +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 1stVir-0007C8-TK; Wed, 25 Sep 2024 17:22:41 +0000 Received: from mail-dm6nam12on2055.outbound.protection.outlook.com ([40.107.243.55] helo=NAM12-DM6-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 1stVip-0007AF-P1 for kernel-team@lists.ubuntu.com; Wed, 25 Sep 2024 17:22:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AIn8ht1IPkbk78bKVRtrlGtJRn3CGKUy8KNhnYXotpZ3+w0F6qJPx8isnR0KdRkAZLcrkepZ2OkhvKYK9EgdZIzW48cSyhiGUSA/WQ+psL4REwzZspBS902u+b+G2+srVUzYhxmxliFbq6Ju/7lt/6AIEJEiCR7TFUPb175LPIR2J3iN4GDjoTIY8Bi2Ta/oi/MHWFTYbC+CiCmJf9jYG8FQhD5sQ3ZgBL/TCsTwrMAxPxQQAcGuYCPNB32XdmozyqBRzniUQRXV87P4U9+rtwOYbT/RIgHi/nMbmnqL0EbaaCWAVTo1bFhrqO5MvIw9C6eB9kl/Ej05k+tvQ2uO2Q== 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=eM0pOz8VDIgXQ45pq/z5lfY8lG7s5KFSU6NZ7UUp1DMnX2W2BEgTUQbNaBTAj4nmuauaqoWEY7oh6/1oyExozPYNQzsuzsgqHHJ8paNNVvnir4WrzUC5tSqHZKh9pVOtMf4htceHLs4jKGPAx3FYmab5q2JYfqLuENYBuhnA7vUGUfr2qv2MC78QgAtrw9Il6aAPEeCxC2hd1tHo6U/3TpixY2XO9Lo9Ubuy3Fcs/ravWSyDOeHPMloDumhKwE+nsXbBDbPFjVSM+VGV57uM8IUWeiT3aTuvCXASd7wFPhPofBECEANof5hIc0swsg6MOfD4hXGEDaznIHIq2fdHrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) 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 CH0PR03CA0224.namprd03.prod.outlook.com (2603:10b6:610:e7::19) by SA0PR12MB4431.namprd12.prod.outlook.com (2603:10b6:806:95::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.28; Wed, 25 Sep 2024 17:22:33 +0000 Received: from CH3PEPF00000016.namprd21.prod.outlook.com (2603:10b6:610:e7:cafe::96) by CH0PR03CA0224.outlook.office365.com (2603:10b6:610:e7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.17 via Frontend Transport; Wed, 25 Sep 2024 17:22:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) 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.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by CH3PEPF00000016.mail.protection.outlook.com (10.167.244.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.0 via Frontend Transport; Wed, 25 Sep 2024 17:22:33 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 25 Sep 2024 10:22:20 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 25 Sep 2024 10:22:20 -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; Wed, 25 Sep 2024 10:22:20 -0700 From: William Tu <witu@nvidia.com> To: <kernel-team@lists.ubuntu.com> Subject: [SRU][J:linux-bluefield][PATCH v7 2/6] UBUNTU: SAUCE: vfio: Add vfio_device_get() Date: Wed, 25 Sep 2024 17:22:10 +0000 Message-ID: <20240925172214.1511114-3-witu@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240925172214.1511114-1-witu@nvidia.com> References: <20240925172214.1511114-1-witu@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PEPF00000016:EE_|SA0PR12MB4431:EE_ X-MS-Office365-Filtering-Correlation-Id: 2b76f735-27dd-490e-0c42-08dcdd86a46b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: I6J5heBHLCr/TCvnN0pG8eEZgrTv1SO9RrFT7qhMULxZ6jTyAL4Q2EOJth0wwRWJ9ugPPLBBIOjpxBBWS8ESpKOtU9n/JV346dPU8g310ugF+RGcojVgr/kE2yqdeo4GMCtrm8fuYZxrr2jGmt9obFooIrZa2uzgsAxkiwjwszUQC2vM37feF3Yx8qnLzqOyuGxBXX3+zSZxDttXChCvnM5ykVd/aKnB8KJQ5G9+5QI6VNnPlte/6FGwCmaO93C49AAT6zsZpNJagxLnXjyEXyGa+wuzTSNPwkCrxvJOK86tRYaLz9JwN7fch9/ASxPXOBnDFSEuXIE+o80D3ZUbwBkez4LDEV6SJ0+REIKWzSXLKddEw5DxcpL74QpPtmjOcUPIh/33ZJphglqNt2OqH/jiY0bWONUbDhzizKPq+7fH/taaK09HXgHNnAUjUr2PvPkbjKr6KEs6E+LwBWLOKz9PhTKq0ieHHKE/IWn5KLogPDp5zjnKpAVfQfes/eF44ra+anI2mAtVZkFsXUIhDW11uCvcTE2KVehcqz5GgtTsVL6mnbRJa9ORHX50Zb/u/2xNdWWOFk95xapzcHWwLFhF0EsNnNwaMuAqqrhjFl0sgz/DAqmf94HPgj4KaIHfbHHbup4Q1zq9BtKLv8egh6RrdWwd3ZzJfufoojaPtRfOWGbkg4kzatTW8icjrMdND9eDWvZf3M/rBXGfOsFjrD1bdzOuZTNYb/p3D9Tn8PTDiVg/9dI92R/tDMbJNCgG8hVOktDA3D7Jb+7qqWCSpvD4ZBjq1eM1Mnj/1qY3FQloP+Hve+76OEc+XOo6F3zmMIpkDhuXBKkndfyyOx4lSp/bom7Sq4GlEoeU3MdLMd9UrbxD18oWib01GzWSQO1k6lsMwNDXRTywfSz0anlohDPIamfRW2jm5UTQ/tFeGfOUkzjvotoDwhCKTFpVPlxWgJNWcjWSOTLytACLZlJvIKNU9wnw43dDMIyUzs6w60uXfsRMNMaMaS0Q/dyOpobK09lG9+zRAnQIrffYecxiWlefPe/9Uw1LD4jIiV6J8J77TkqsNa+swRBYyVC1D1tyIszeRzKhzYpsRChvi+7hzAl6o7hoxsDZ/gbS+AxNY/ix5XtCCWGt47RtTSxTwiMAjfHQLgtQldOD26wqbIlqC5O/vL2r5RvXC008/vTubdEZEYhI71NPGmfo1ksAdd+NMkcelBO0J8xI44AhYU8dn9gqH2NeCW7tiUIVtY2OjmYMQf2w4Bzji9WD338r/fmt9sgRznGN7cHCpO9nJKJRSEu0DcK78hxHEUCEqTJdb01azFbqX/AJL9P5GuST8gzqc9cT+vKXTf3oeUOQx/xXj/jkRwNjV+i7OJUue7QlP6u8dsMvho++Pm6tUh7O/V79DrvIBKtj4ik3JYyPQiIDPfJU5KKo4L0jJi1/ZzYqrFPXac7TtLJC4K21J1732ULA X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2024 17:22:33.2040 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b76f735-27dd-490e-0c42-08dcdd86a46b 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.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH3PEPF00000016.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4431 Received-SPF: softfail client-ip=40.107.243.55; envelope-from=witu@nvidia.com; helo=NAM12-DM6-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 */