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 20EC642A94; Mon, 8 May 2023 13:18:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A650F410ED; Mon, 8 May 2023 13:18:25 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2083.outbound.protection.outlook.com [40.107.94.83]) by mails.dpdk.org (Postfix) with ESMTP id BB2B140685 for ; Mon, 8 May 2023 13:18:24 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GYvf0DfyIAN3VZDzlBtL/K4vuquMa9TZ+GC3k8lxVgU3eg85C+wJKIFJ87BObxirKzT+5KXr5IXGTku0Rhxws9ytDSlUjdWdYLKmT4mEcjstCDtugmBZu8lfHrgHc4Vo3YA3EG5Sjw8aNUMOGZBqnmKpRWWk3lvW1+goIDih51OsaU3YIwvR4ikr6QoWGZV9FAEhHethvBidK/9Z1ANxhu5VUgzpe4H19QgvHv8TTpAMnYlKR5wodN0zXoo9Du0nqkP/oDTKG9OS4ddLB0/DgfD9Ajg6jd/BvLi6jOLD9IzcN6VP1iIjApvYsYJZbTvH6N2jidLNML2lZYavGC5sEw== 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=zAHlEBKf76jH560XtAdhBnzKVS8NOTIS32fscXf1Nng=; b=Q/DybtM0oGNlPoFuhYVq4bkuqnhLVMt3Vq7PAUMBGWbKQwbBVfYEdhBfhSEiRG63fXdEO9i6zXeU3UVAd1kz4afvfntDzFnlV14Fs1UeJuIjdjoX+ep+PRXpNntYF7jzIpOBYNk6AfF6rY3iJVPnRAlIl/QrNjIFmHq+kN8IgelsOqIVISRLegcjYJpnvOGmJYpR4Pv8lfYJ88TiVFnLPrxfsBeUXQVo/eDB81SJISQEJ3gyVnRrxUs1g+aqZMPip1J+7rF/70TiS9zywAfD5zRZtrhz/RRJtAt2RjwNPAiIqYVYbsEfBsRHHvZ4DBBRf8MtbUTivnHDMynDTHhEGQ== 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=zAHlEBKf76jH560XtAdhBnzKVS8NOTIS32fscXf1Nng=; b=sjaR+JMf+MlKdmDQzopWheeH/IFiuI8/Uo25ituHJAX4wEtCM3dnTUd6tNvCWMcQCYf4Yuldfuz3ACAwzl1QdJTCEbJrf/wLoxiaug0MoI+lQ27uHFyh6+4q94yjJuYelD8f/H2x3X5um7O+RDQtTjazCbntfOimrvSs173g90U= Received: from BN9PR03CA0883.namprd03.prod.outlook.com (2603:10b6:408:13c::18) by PH7PR12MB6563.namprd12.prod.outlook.com (2603:10b6:510:211::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.32; Mon, 8 May 2023 11:18:22 +0000 Received: from BN8NAM11FT072.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13c:cafe::e6) by BN9PR03CA0883.outlook.office365.com (2603:10b6:408:13c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33 via Frontend Transport; Mon, 8 May 2023 11:18:21 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by BN8NAM11FT072.mail.protection.outlook.com (10.13.176.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6363.32 via Frontend Transport; Mon, 8 May 2023 11:18:21 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 8 May 2023 06:18:20 -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; Mon, 8 May 2023 06:18:18 -0500 From: Nipun Gupta To: , , CC: , , , Nipun Gupta Subject: [PATCH v4 0/4] Support AMD CDX bus, for FPGA based CDX devices. The CDX Date: Mon, 8 May 2023 16:48:08 +0530 Message-ID: <20230508111812.2655-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: BN8NAM11FT072:EE_|PH7PR12MB6563:EE_ X-MS-Office365-Filtering-Correlation-Id: 9672105e-d925-46ab-0b55-08db4fb5eeab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7VqfqSFB8a7BUSNTP/wgEL3qV/MobKHeNHP//F189BI+D54bPFvKPzCRpg6YyJsZYYdLnFwocsYHGEip7MuqftOB7z1q2arg3pKNS8u41m2bi8fngzu3SKmKR+nXXyImJdWEyWmIJ8Ggz/btztlms+a43SSZkMRAdQEBj3yl7qB9EnyRJiijol1uS/9oa8IzGgtol3ak08Ud+xHXWUDAfSeOw2Es/uW000cHDEhh7teh9IxVFQSFpr2NZ4qlZigy3+P3MSgKiM849SnLLUWKzNcaQTZCGo0dGVXR+pllTj3zhftV1t1ymvib2DvQ3E0mKDCoOtD35pUMyjwYXMwstAAjNBjU7HLhE6I8xACrX+NlKPeSsC+zb9lWGu7l+fN292pdbguexdUe8YCGMcyOC+bfoGM2xNA7jmYuIyC+XartBDAliSQ7BjPz33dB18nHSkLBm2lS6jgbcq8zzTz+N4iF4FQBBJi1B5jBYa5a4DxjeNSeOpUmf++B+druu+xZIiXTpbbhWcgRlwROxKZvoXf5gQ3MfpzSK/bHG4Y2HHZX+MySEABOS/RTjG5W6MZmSjDhfNy4rnoKQnZGDC49kUAMGVWlw4katgHF9x1/Us5E2vJxC5ftOBccUvwiEPUlYrfhpqrAAWqK+OIOL9a+ktGI4fGNhKY4uvin3uKjAnczd7r6Z3wi24Fvz41CaXIlIBUsDOwmF4O8ONsrx0QP+5FC8vG9kC2Onwlcu1eADx8Wt21L1yDeoTJ2BnDOrCwrxWvQnCETt/8bsmDA1C/YUA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(346002)(396003)(136003)(376002)(451199021)(46966006)(40470700004)(36840700001)(40460700003)(2906002)(186003)(4743002)(1076003)(26005)(47076005)(336012)(40480700001)(426003)(83380400001)(36756003)(36860700001)(2616005)(81166007)(356005)(82740400003)(8936002)(8676002)(966005)(478600001)(6666004)(41300700001)(4326008)(82310400005)(316002)(70206006)(70586007)(54906003)(110136005)(44832011)(5660300002)(86362001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2023 11:18:21.4606 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9672105e-d925-46ab-0b55-08db4fb5eeab 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT072.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6563 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 It uses sysfs interface and the vfio-cdx driver to discover and initialize the CDX devices. 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 v3->v4: - removed platform specific patch (adding config for ARM CDX) from this series Changes v2->v3: - merged cdx bus compilation enablement in the first patch - fixed issue reported by check-git-log.sh - updated release notes - updated offset to uint64_t instead of off_t in cdx_map_resource 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 (4): 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 MAINTAINERS | 5 + doc/guides/rel_notes/release_23_07.rst | 6 + drivers/bus/cdx/bus_cdx_driver.h | 227 ++++++++ drivers/bus/cdx/cdx.c | 693 +++++++++++++++++++++++++ drivers/bus/cdx/cdx_logs.h | 37 ++ drivers/bus/cdx/cdx_vfio.c | 615 ++++++++++++++++++++++ drivers/bus/cdx/meson.build | 13 + 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 + 14 files changed, 1715 insertions(+) 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