Message ID | 20240916153057.17319-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 4X6pmW3TGlz1y2b for <incoming@patchwork.ozlabs.org>; Tue, 17 Sep 2024 01:31:39 +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 1sqDhL-0003Kt-QP; Mon, 16 Sep 2024 15:31:31 +0000 Received: from mail-bn7nam10on2077.outbound.protection.outlook.com ([40.107.92.77] 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 1sqDhJ-0003Jc-RT for kernel-team@lists.ubuntu.com; Mon, 16 Sep 2024 15:31:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=O44xPVsaejD0sWoXR44T/D9hHIfRqv1d4LnoDBwygIK/zovi9Oz9AfosiDJ3hAjIJKSaLzLVRZXyHcGviW973DJJjXwTa+Bec7dsGItP17PJDsnNRnCnHU0DKE2K21ZUko7DUc5npu3QNpJy0TIpHVpPtD1rRmvjZjVSr3mV8mfuzKG0am6qMyFMCUMANhB5SoOX3oEO1vqX9i6xLXIT0l4iNC285aZ4YshRi0IEqKOBZSAXCjWSh5UjYjMetNp04hfdRp+8pKd9fISTmg1fN1F2mFmpLMT75kJ4Yyh1hg9Mg4gYWYaBnzkftDnFezIaeCAyeCO1arZdAjkC3pAzuw== 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=Ap0f8BYcm69JwnjCGmddR+IiLrQtGroolBHpK7MAHSkxxKPZHzOG1Cb8MkIizphYNhZoHd3u2py2AkHXJAFmVhyfW/50SyfvsG5iIr+vK6bGSj1vy48eaojORhOCeGZ0zbyhatjyLzezl2vKz4gIU2w7CU1r88QFP8N/av/S87nesIETfpS3JHNUblT6JNheAhZWQ0G3DBmvoXGSKJPhBDR9zRVW5vpNdFa5zFJNd/tay66vJvJ+5fLcxBd+FDiPIIXgBgD6YmBprqu4xuCGZKDVCBKohm6429pbQ3i77ebk14lj+B6DuKXgUgb+310G/h3AKSd+0j6g9MSrPDwVIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 CH2PR03CA0012.namprd03.prod.outlook.com (2603:10b6:610:59::22) by DM4PR12MB7573.namprd12.prod.outlook.com (2603:10b6:8:10f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.24; Mon, 16 Sep 2024 15:31:23 +0000 Received: from CH2PEPF0000009D.namprd02.prod.outlook.com (2603:10b6:610:59:cafe::89) by CH2PR03CA0012.outlook.office365.com (2603:10b6:610:59::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Mon, 16 Sep 2024 15:31:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CH2PEPF0000009D.mail.protection.outlook.com (10.167.244.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Mon, 16 Sep 2024 15:31:23 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 16 Sep 2024 08:31:04 -0700 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 16 Sep 2024 08:31:04 -0700 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 16 Sep 2024 08:31:03 -0700 From: William Tu <witu@nvidia.com> To: <kernel-team@lists.ubuntu.com> Subject: [SRU][J:linux-bluefield][PATCH v5 2/6] UBUNTU: SAUCE: vfio: Add vfio_device_get() Date: Mon, 16 Sep 2024 15:30:53 +0000 Message-ID: <20240916153057.17319-3-witu@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240916153057.17319-1-witu@nvidia.com> References: <20240916153057.17319-1-witu@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF0000009D:EE_|DM4PR12MB7573:EE_ X-MS-Office365-Filtering-Correlation-Id: c2c389de-3463-431d-0a2f-08dcd6649f46 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: h45RtaFbQUBdya/tTy0vbGkU+9Khg6A/aKDt46u91qHQ8t2OC0ft8XIdAYIqazSk994ktwSllStLfM2T3VA4PvBg+PyvurWgHOpFOOPCE/R+MQZSi/u18Kn9Es92Q4p89hnTebzGynr+W2dMbcrCVYsLr4ay6ZCoRV8HmDhIs0Ouqav2+QIHVzKRhPzoPs4e39MqPM27CWZxaD3fbqG5UiIwCt24+P9aUYK5jTmb9cAij11vJktWWDbqyXfDjOngerk9azZfABA4K0v+yAOxTk/xb6VO3aHhDlUAalWZ7HBhZ+SOzAJuM97OlaBJCXFj36ZsrfwcDrz1w5yphLGuzOVGQLIbPsejoMb7jYAkuwfl3uOJ3wl6lC139TPRY0Zr6DtNOW/zVznLO8LdViKiNKDRkS8mxoggV3ux76qKulEMorqKMnuAvBJhk/qqyt6oYUc4EEk+bhOd6yQupOG9KQhKZ15a2ivrHkkdsMlGBeVxCdMsCDbekuUxuREb6w24sA+NG6riQgepeK2U1Kp6Gm/d5Jno1OsvtaE2BseuegjTBkUlGLyDn16soCDJjYipW6WG7QKA/Iav9fVrIsYOPzLtNKfjQnjLDteC/K3z41LQijqyJJhUrB2XO+KC/xxftssI37rcBtPH5mo1plIUYGwrzB6ZLYP6pb4P0TjtL6O3rhhH3RN/U2V97fElHKaABvkCtewBiWZc2zBRUktvwc0/Mw3q3DXHlRtBtz6UyjBmgexfXBPzgddvJTYNKKLCa2NTakmyqx8x5iHvF3Q1qZKVupbA0gicVQFNbkthcfnTeJKaa6g2ehChFbRmztzA4dLois0ZcRMacxuHyg9VD014mNckKqdxleYtceteZZ7vHyLl4R+7/rw+HUgfvWT/zxpvXzXjO1KZuGlKUNuMwBJCh8jDjK8IAV42KsFtQeUKaqKIYIE2EI+f/w7io1QPuF/Y7Dfd3uHJ7DhETu9cWB1UYttFyzv+BErBi7pq87kOyRFBvcTmPIHSJxl+kAzG6IpIkY/0tE/icA6qNVOowtg5lvI17nVBr/XmI4JWfurkwv2K1h6LT5Z0WySQ9bWx2BRwlNbCDAx4XddZdT3zR9KXw+iNOnlbv7Z5cJC2r4obtfSNZTLhvbnNkgHNU15REOZRPlZ01A387sYSjttuTaWUvgAI3u3dRiEmRk/8gTcnc2xMGW4Fg54Ta+kvvgZpwrSzlYJV71kh1wZQB4rggMvUZOumsoP1RWy0utJv8U8OUsYgQFBUenFoc8jfjz1R4C0n0IXpjm3KxtNhAYQz+XRgUw4hK/QS/yo1CyEuj8hY+2BX94Q633kXXQ8y/6IHnpiliYC7COxtXwQqqBnrmD00ZsHRI8LZMi9zNySXqEKAlwOS6FH1a01lmQMsio2/kclXpk6CBVY67Tgev3UaVODKgX4OdMcd49eJIBQ41KGWPXT98dVeNzLIQ5qN2TD8 X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Sep 2024 15:31:23.5446 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c2c389de-3463-431d-0a2f-08dcd6649f46 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF0000009D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7573 Received-SPF: softfail client-ip=40.107.92.77; 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 */