Message ID | 20241201103659.420677-3-ymaman@nvidia.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D34C8D49761 for <dri-devel@archiver.kernel.org>; Sun, 1 Dec 2024 10:38:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4AFFA10E216; Sun, 1 Dec 2024 10:38:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.b="J7kLu88k"; dkim-atps=neutral Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2080.outbound.protection.outlook.com [40.107.244.80]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD69E10E216; Sun, 1 Dec 2024 10:38:17 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=l2eEo3JjBbLTQYmp7JaASfZ+08c2xUiSPMRSCJxNZonGKUR9kKEUYOAiosWiBx0zxpD0ura8P3PlT0MA5ifyiS/SFWVU1BeR3zSvKpBpBo5pBRFRI6wKpPINOS9lhsnNFeUuwmfVKDgOD9cPBiIFrxWZUsbv8bSUGeCWd2/Tgj8pZhwfdPjXEpRZofMapyf1EGvygvYShOgX48sarHfTGyZdeYYfr9eRV1sqoefMxjVFggMOE9KNnuznetSWxp6+4jSUgIRrPaJdLsfsa5D9heZ1ap5kLiv1jW3ZzK56mVBX3hUBR1+ubSRDIlVlj2ARhLdSLRoxijFrY6caW5Fo/g== 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=UA/4IxtsjDCMtBq0SlhR9bcQvXIpvvmGq2lJk5dRHR4=; b=YFR0hPn4TAMd0ljg+5Rsn1f7SzbtmM0jbSrPybw1+kn40+58X19wXjZvr04BKFEceKISYuWCdHJ1Ig37846HqEH5I4aPfgFqFZZwoJSG2lLgTztunsgwyCdrhoZgON1D1OTCBE9eMNX1xh4niFlKpp1DT5TBJAHkodgtEqKJamnbPaQPpNpMwusfdFVCN4pKsKxSJy2uwYVaAYK3o3MZD3XG0mN7pSILY6Xb9k9iTJ/23RxIJ+XsM1HWxWc4bmlcU7EhENJOSYqd0wgg5/QOMRZ6gV98z6NWewsDpOfBnz9SjZCgK3aw0gDfu+hyR1aR6My3PSYWLcRtOhr7kyWydQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=redhat.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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UA/4IxtsjDCMtBq0SlhR9bcQvXIpvvmGq2lJk5dRHR4=; b=J7kLu88kTOcBPx3vqLhtD5Q7ANddfM2NN5b9z+Jj6nJuh3bzGFMF+ssoaqsvz9B9zVOngS0xCcvy1ozISCWVXUU75aUECHNOQlxtlGkY047i7IgZQ6aUwUWzvLvN0FK63v2HEqlqZEGu/ArSljRbyXXe1Qzz5Lr468Zqutbz9Y2BIuDsMKO5XiynaYL8/3/l1UesxfL5XAXaBqfFZnC0/LXaxYQ6PLL3X8S8HRRTWNTg4eZ6COx/+qbeMK9BbnnF3Kwcm9Pos95lKnh7wkK9WMGeopXpK+e5i3P+yxfIXq2/euOSAMIurqddDT2siB1R5jlQbO0T6MbgI3SR4GEAYA== Received: from CH0PR03CA0258.namprd03.prod.outlook.com (2603:10b6:610:e5::23) by PH7PR12MB6657.namprd12.prod.outlook.com (2603:10b6:510:1fe::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Sun, 1 Dec 2024 10:38:07 +0000 Received: from DS3PEPF0000C37D.namprd04.prod.outlook.com (2603:10b6:610:e5:cafe::7e) by CH0PR03CA0258.outlook.office365.com (2603:10b6:610:e5::23) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.16 via Frontend Transport; Sun, 1 Dec 2024 10:38:07 +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 DS3PEPF0000C37D.mail.protection.outlook.com (10.167.23.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.7 via Frontend Transport; Sun, 1 Dec 2024 10:38:06 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) 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; Sun, 1 Dec 2024 02:37:59 -0800 Received: from drhqmail202.nvidia.com (10.126.190.181) 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; Sun, 1 Dec 2024 02:37:59 -0800 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Sun, 1 Dec 2024 02:37:55 -0800 From: Yonatan Maman <ymaman@nvidia.com> To: <kherbst@redhat.com>, <lyude@redhat.com>, <dakr@redhat.com>, <airlied@gmail.com>, <simona@ffwll.ch>, <jgg@ziepe.ca>, <leon@kernel.org>, <jglisse@redhat.com>, <akpm@linux-foundation.org>, <Ymaman@Nvidia.com>, <GalShalom@Nvidia.com>, <dri-devel@lists.freedesktop.org>, <nouveau@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>, <linux-rdma@vger.kernel.org>, <linux-mm@kvack.org>, <linux-tegra@vger.kernel.org> Subject: [RFC 2/5] nouveau/dmem: HMM P2P DMA for private dev pages Date: Sun, 1 Dec 2024 12:36:56 +0200 Message-ID: <20241201103659.420677-3-ymaman@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241201103659.420677-1-ymaman@nvidia.com> References: <20241201103659.420677-1-ymaman@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF0000C37D:EE_|PH7PR12MB6657:EE_ X-MS-Office365-Filtering-Correlation-Id: 124e31bd-e88b-4ca1-39ff-08dd11f43e3b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700013|1800799024|7416014|376014|921020; X-Microsoft-Antispam-Message-Info: JlS2ib7zLFQeVi6ncrc2kdUZJp2r0qik4WAftnohOi3NKtCjGgBHNVCHagKJVsVtDZLUGjbL0hXTaXVHlFhDYjmLET7+lsD1Ocj6Wi8/5NhRqBAHt8weob7r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yzoVbCPSfOUiVaiNSexx/M7/Opz/Rm8+uWQsUGwaBZwrdzUPMtrRKNbpyto0ES7MR9IXWiRzU1w4BCVYuvcTDpXJfZ8R2tDPhwmMJVqLxtsw39EUHBFTgq3j7Yzn4rnIScVU0wUDoju9kJErnqA1q/cKrICzN19bHOsif0Bkdg4X2nlLeNTbsexiBf71RlZuS+XTedCM37Oz71H4dMHGw0YX2dHCK4t5UeVhUqyAQE5tPe2rdH0hECam+IxIUJ8Hz8ab3k/pT+WX876AtQpUNMdhClFKXyYIQ== 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)(82310400026)(36860700013)(1800799024)(7416014)(376014)(921020); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2024 10:38:06.8833 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 124e31bd-e88b-4ca1-39ff-08dd11f43e3b 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: DS3PEPF0000C37D.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6657 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
GPU Direct RDMA (P2P DMA) for Device Private Pages
|
expand
|
diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c index 1a072568cef6..003e74895ff4 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dmem.c +++ b/drivers/gpu/drm/nouveau/nouveau_dmem.c @@ -40,6 +40,9 @@ #include <linux/hmm.h> #include <linux/memremap.h> #include <linux/migrate.h> +#include <linux/pci-p2pdma.h> +#include <nvkm/core/pci.h> /* * FIXME: this is ugly right now we are using TTM to allocate vram and we pin @@ -77,9 +80,15 @@ struct nouveau_dmem_migrate {