From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E359942933; Thu, 13 Apr 2023 15:28:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E291A41138; Thu, 13 Apr 2023 15:27:55 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2041.outbound.protection.outlook.com [40.107.243.41]) by mails.dpdk.org (Postfix) with ESMTP id 81A3C41153 for ; Thu, 13 Apr 2023 15:27:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oQ4ex14AVhuCMEot2UiBmX+rtt2zSmx+2Kryene2Zs3crSgopXMPhShomOY71US74O40ra4H1XGbsUASNW5xC+I+AJvBxJdSm5WGl4i+Ili66ZLfX9BuU9ZzK9RJxaKguEBdok+TENVz0yg8Wcu9JMWJfoUne4FBBAiB75XOn5koOqojsPSMPXnfb1OQgBcQr2i8sgQv1KoQhX5HLHElFX29wryAOrlYoTgIccw2xhHlqsrvE/n8Ie6lvmLLl7cP+AcLhrIORUluKve9n4vgS5t7nv7jMDCNmPR0FRgGQ1+9HIOOnMFHeNpCFgIiDw+skSFBb7ZtoYlxTNiCs3WMQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=cSEAiYPjUlXUQKhverHOmmwbbqNHfBWG3XEijDiDD5k=; b=GMrpNGkKiLS8sdrhQq++2lDnqN6SNPPkQFssuI7ydtRV6EJJeawdxZxt4a/B8VNjObxfNnsRt2qLdpq9i3XIjZRDYz0sYJvqMGJUdYxdWVV8DjJxIklWqViCLDBnGCOA0xF0R03bMNPbFOTXP2xb21Dlq8ZDcuX8Yft4RPA8TuvUro4kDfl8+2qZMIeIQ4G7Lpmw14MX9ba7DIa7qSrkCbgoI8CaD2d0tgiYVmwIwbm3DoyYNafNNS9eRQfnV7OVQk9dVF9dNwvaqnH2fUoDo97VRyMjoslmUNZUwUR/y6dqfalASUXoYx78ekNhm6oqc8fpNkIxEFX1h1mqcc+IaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cSEAiYPjUlXUQKhverHOmmwbbqNHfBWG3XEijDiDD5k=; b=nPXBbjapRgN87QU2B8yzKNB1DOLXy9Biv+ELzJ8JgExchzTFGlKLZ4cqJNXjqaFFTZEjYp17OhJQn6Lx3G75/CnBYpgvJklWvIgrMPnmdkd6qpWidasSzI3AWmax8fJeAgfp0u3VUCM/dtgVb6y+7a4hP/xzBSnJprZ+Tm+BrAE= Received: from DM6PR18CA0007.namprd18.prod.outlook.com (2603:10b6:5:15b::20) by SA3PR12MB7805.namprd12.prod.outlook.com (2603:10b6:806:319::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30; Thu, 13 Apr 2023 13:27:50 +0000 Received: from DM6NAM11FT045.eop-nam11.prod.protection.outlook.com (2603:10b6:5:15b:cafe::37) by DM6PR18CA0007.outlook.office365.com (2603:10b6:5:15b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.32 via Frontend Transport; Thu, 13 Apr 2023 13:27:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT045.mail.protection.outlook.com (10.13.173.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6298.31 via Frontend Transport; Thu, 13 Apr 2023 13:27:50 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 13 Apr 2023 08:27:46 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 13 Apr 2023 08:27:34 -0500 Received: from xhdipdslab41.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Thu, 13 Apr 2023 08:27:31 -0500 From: Nipun Gupta To: , , CC: , , , Nipun Gupta Subject: [PATCH v2 0/6] add support for CDX bus Date: Thu, 13 Apr 2023 18:56:58 +0530 Message-ID: <20230413132704.17586-1-nipun.gupta@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230124140746.594066-1-nipun.gupta@amd.com> References: <20230124140746.594066-1-nipun.gupta@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT045:EE_|SA3PR12MB7805:EE_ X-MS-Office365-Filtering-Correlation-Id: e4b6acc8-5d64-4b3d-324a-08db3c22e0e8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pJFR18+qX2ZzFW9HQT153R3E/IILjRRHkOivSPwlr0qyBbLCWcWikkGldehXvUPJmxsxidClyoYqtLAkspKr42T2QYBmzhSrs/2f81tnj87zAYuVm5syc05l8G3ZV8VLDAeQnpOWemZZ0ONzFUbkWvSYKj9JToTjENVPMJsV8sBRonCYkx6mosugum/CC7AD70Rd9tkrN5FWN3UpbNCcsmp5yQwf358QxHjRI7ExFWo1ZPnbtb5fnZ9SfKQaICF7PNYUGV/amLg13WLQ7Tkl5WJSk3K4Mi2BuB6cMihA3y+oHbD6ckHgagyT1CSnrpWVqRxCPq5hDKVG6VEBhb8yGfWioyBjAfiWlj/TTCz4uYJ6Ycn4S3Wl1zGiZYXm3OSiOqDGXSnKlZwCyI1VqM6Zf6z9trD3UIgnd/kC0S2BpDGn82nKwZLJkMsWLjD3yW9SJUCAj3OM9C/bpNbM7qrUEMMctR3RfZDePvpmT17hPrjW1bOzG9DBAnEixvPjGBQt5TRVHLfekSlV5dzwIGJ4+Y7vZm2CiI7FqciSVyRJKKLwKyTHc7bOIBV/gsxQe+7NT1f5NWbnVyaKjR3dy3Jyn+fP77FDzwwii3Qz3mmhYPqKQLg15+daBM4KFvTt90miSHt9ZE4UpnjGcFrPUh2SbE/tmZmfgZ0ykRfoht1BfsB1PeTL+B45u1yreZD88PBpZKCLxdLmgSKuK76IlB4jIxqojl5lzv3oauZ9jnCkLB9dUkWHQ/9J9IsS1vrsxxoF79IXP7xgg3MjYDrlgxncuA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230028)(4636009)(136003)(396003)(346002)(376002)(39860400002)(451199021)(40470700004)(36840700001)(46966006)(6666004)(40460700003)(966005)(70206006)(70586007)(4326008)(36756003)(110136005)(2906002)(44832011)(86362001)(81166007)(82740400003)(356005)(41300700001)(5660300002)(82310400005)(8676002)(8936002)(316002)(478600001)(40480700001)(54906003)(1076003)(26005)(336012)(426003)(36860700001)(2616005)(186003)(47076005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2023 13:27:50.1987 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e4b6acc8-5d64-4b3d-324a-08db3c22e0e8 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT045.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7805 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Support AMD CDX bus, for FPGA based CDX devices. The CDX devices are memory mapped on system bus for embedded CPUs. It uses sysfs interface and the vfio-cdx driver to discover and initialize the CDX devices. The patches are intended for DPDK 23.07 release, and have been sent as an RFC as patches are yet to be merged in Linux. The CDX bus and VFIO support is available at Xilinx open source tree: https://github.com/Xilinx/linux-xlnx (drivers/cdx/ and drivers/vfio/cdx) Linux CDX bus patches has been added into linux next: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/cdx VFIO patches are also submitted in upstream: https://www.spinics.net/lists/kvm/msg310623.html CDX is a Hardware Architecture designed for AMD FPGA devices. It consists of mechanism for interaction between FPGA, Firmware and the APUs (Application CPUs). Firmware resides on RPU (Realtime CPUs) which interacts with the FPGA program manager and the APUs. The RPU provides memory-mapped interface (RPU if) which is used to communicate with APUs. VFIO CDX driver provides the CDX device resources like MMIO and interrupts to map to user-space. DPDK CDX bus uses sysfs interface and the vfio-cdx driver to discover and initialize the CDX devices for user-space applications. Changes v1->v2: - Moved file rte_cdx_bus.h to internal bus_cdx_driver.h and added this file to deivce_cdx_headers - Moved cdx.h to private.h - Removed rte_ prefix from the static symbols in .c files. Changes RFC->v1: - Marked few API's as internal which were not required to be provided to user. Nipun Gupta (6): bus/cdx: introduce cdx bus bus/cdx: add dma map and unmap support bus/cdx: add support for MSI bus/cdx: support plug unplug and dev iterator bus: enable cdx bus config/arm: add AMD CDX MAINTAINERS | 5 + config/arm/arm64_cdx_linux_gcc | 17 + config/arm/meson.build | 14 + drivers/bus/cdx/bus_cdx_driver.h | 227 ++++++++ drivers/bus/cdx/cdx.c | 694 +++++++++++++++++++++++++ drivers/bus/cdx/cdx_logs.h | 37 ++ drivers/bus/cdx/cdx_vfio.c | 619 ++++++++++++++++++++++ drivers/bus/cdx/meson.build | 12 + drivers/bus/cdx/private.h | 49 ++ drivers/bus/cdx/version.map | 13 + drivers/bus/meson.build | 1 + lib/eal/common/eal_common_interrupts.c | 21 + lib/eal/common/eal_interrupts.h | 1 + lib/eal/include/rte_interrupts.h | 32 ++ lib/eal/version.map | 2 + 15 files changed, 1744 insertions(+) create mode 100644 config/arm/arm64_cdx_linux_gcc create mode 100644 drivers/bus/cdx/bus_cdx_driver.h create mode 100644 drivers/bus/cdx/cdx.c create mode 100644 drivers/bus/cdx/cdx_logs.h create mode 100644 drivers/bus/cdx/cdx_vfio.c create mode 100644 drivers/bus/cdx/meson.build create mode 100644 drivers/bus/cdx/private.h create mode 100644 drivers/bus/cdx/version.map -- 2.17.1