From patchwork Thu Nov 14 22:52:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13875711 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012053.outbound.protection.outlook.com [52.101.66.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2D351AF0C2 for ; Thu, 14 Nov 2024 22:52:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731624779; cv=fail; b=TkeTfomGA44+VWbwCl+fpZlac++kBcgABR7UyMRD3E52zyrYHgaKv3SnQm9YMOmRveFbyHlhDYbS52q61GbtxEkKW+Ig49QlZU8AI5R2PQo9pb1SZMHaEvp+AenOXUOQavvq0b55GSBD2hbwHgqT/6yRg7mWwRLhBSN5cjMXThI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731624779; c=relaxed/simple; bh=ulQGXi1yIK/ntnlII+cu6+O4pVuCk2wjHjuwBbJVrKI=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=kRfjk2Omb+VkHg5KaM2gnfuyct79igtKnpPRQzX4y7y5cgo7F6M3wD1PaSHoSc7SkbPtwLBYz4jOa/cIQLN3LBDoJDtJE7Jx2TcybykixZz71PrCnV8vpFECsM8Qb5ucX5k9zQhxS2SndVRioFrnwQ5jIv6VhZhohbzkc1HRC6U= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Ncltcj/x; arc=fail smtp.client-ip=52.101.66.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Ncltcj/x" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X0RC4F3xBQWXfnll86QVj6Dne1JBUl//Q9ELQBEkRuB6sSvWrxcJoBaQ8pMZ21Dqg9WUSJRJsFEIPmsmalmQTCV1riQKSj/tBwyNDmWbJHNtl68cT+yREfdc2ITtAyPmHBS0JMeV238gHfkM7DTfwQ0RtLEHkE5P3QPUzUanIUpLcwW+LH8lRkIFnfI5BnACLhcvOOsZwJq8HByhk+U9Cpyo5NXG2/x0MwRjD3bq3h+O4/p7k42mI+pFGSk1Xa0VmIHvdYzN6uSiqIUpkuo+mIbiY60I++RuK/6iTIVTj0PjK48TFdkg+mqu28Yec0pMz0a8Q5LovzUCK/Xc9uoNVQ== 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=eflMD8lWFtvSQ0Iakep7p2aO7cQnB2JKh3TU5wN8MZU=; b=CiV4BAXte2MUA9C+Bb6HaLemnVZ8AUTXwsz8P5A0G45FC85yBqDzqnp59DzvWp1J5qI8qG1ccWc1aoPuIW5d8eJrRlrFfMs58lnZdPGG8bjc3+E1OkpuQzX8+H2tbI8RxFMP+RmdFOQBMrUR3oYTPcHqb0dOXEHXZioGb8HDF4UegZ9MUs9XnOV47Z3kBozmQZmumbSLdPrA3y9wHvtRTp66l7s1A5xkoejW7n9PYXBZ3ZQR6Nt19ApdjOPt3uW6PndtVkr/nbvTGxw1YH/ghANe4xWwo9eYcUCz64d8EjKVV4lF706UipW9QlQsnCIP/ZU6+FhCbTtX5+8ClVt70Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eflMD8lWFtvSQ0Iakep7p2aO7cQnB2JKh3TU5wN8MZU=; b=Ncltcj/xJk39ovOhgr9ycVIPOV62+lRvne9265J4ipn107FGJR0oc9j2fTD/vcWZCV1rBL4HjFWj+8+/umPcL20OYnPPE9E9rWhnQInlGDVx6bVNuPA0qeuZFBH3bkB+E7ObGQqpf0bcc25gX0rNHK/m8OaV9cxRG0eAmEXX+T9lWse5QdJqP8Nlf9Ae4+mQBzqRnvggjGGG8gJ7RAf93fd/Y9K3zkD8OJPtYP3xgjQmyM1CLAJop4mTtpXBHQ+0VkgOympdO+o0pbBEFvkI5k0bRQ6uOdIFCJSnmgrid0awFYYLJvReNfqtGaimam4MSUIFMsVMPPVr7ud5fkwFGQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DUZPR04MB9967.eurprd04.prod.outlook.com (2603:10a6:10:4dd::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Thu, 14 Nov 2024 22:52:52 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8137.027; Thu, 14 Nov 2024 22:52:52 +0000 From: Frank Li Subject: [PATCH v7 0/6] PCI: EP: Add RC-to-EP doorbell with platform MSI controller Date: Thu, 14 Nov 2024 17:52:36 -0500 Message-Id: <20241114-ep-msi-v7-0-d4ac7aafbd2c@nxp.com> X-B4-Tracking: v=1; b=H4sIADR/NmcC/1XOSw6CMBSF4a2Yjq3p7YNSR+7DOOjjoh0IhBqCI ezdQgLC8Nz0+9ORJOwiJnI9jaTDPqbY1Hno84n4l62fSGPIm3DGJTBgFFv6TpGWTnrrhHDgkOT HbYdVHJbQ/ZH3K6ZP032Xbi/m65pQa6IXlFGPwZfGQuHB3uqhvfjmTeZAL3dIwIZkRhp0sDwY4 3h5ROqPgJUbUhlZkEaBZ4ExfUTFDgHfUJGRVJXRnKPwfPe9aZp+Zmn0JTkBAAA= To: Manivannan Sadhasivam , =?utf-8?q?Krzy?= =?utf-8?q?sztof_Wilczy=C5=84ski?= , Kishon Vijay Abraham I , Bjorn Helgaas , Arnd Bergmann , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, imx@lists.linux.dev, Niklas Cassel , dlemoal@kernel.org, maz@kernel.org, tglx@linutronix.de, jdmason@kudzu.us, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1731624768; l=6761; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=ulQGXi1yIK/ntnlII+cu6+O4pVuCk2wjHjuwBbJVrKI=; b=h0ltCrHMIWqWyVNoixRcDQdknq9MHrBSrAsBEK/NvOnFt3jObjJRSI3gv/wAQMygiYqOeaokJ xzXI5R9qteKAI0mR0MXXjR41lNzW9IFj0Ah+qEHqvCYeDAY2wFSl/Bk X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR03CA0166.namprd03.prod.outlook.com (2603:10b6:a03:338::21) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DUZPR04MB9967:EE_ X-MS-Office365-Filtering-Correlation-Id: f517831d-5524-43ac-ea6a-08dd04ff11de X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|7416014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?nFkK4xTZUFMXTQBj3OY5uFtbXs28pXs?= =?utf-8?q?ih8eXnEjzk40pv2E/5T0UZMGuS5XS8iNp/C8xM/v/uEpTxcDqObjNrsEciduZ3yJl?= =?utf-8?q?NCQiwKQHOztnkTs3/kQ6hIDb1UN8UCQ+9ssE5wkYlIOn9MfY/QFPSlkRac1ZrKsav?= =?utf-8?q?9KEtPUsm9T5zs1ugK4xgpKGuBlsWJIcyW6uBZiJ7MzacgeGVwg+n8piIiw6B5sQR/?= =?utf-8?q?Psv9fXNT/3fAr0D32rUVH2j1gCjSX9xFOrLuy+7g9Ll92Ay5ic0fXxW9zJJys3TKr?= =?utf-8?q?zn75aq+3v3Y1rd1PNg75C3oztpQLSe7O4aKNWfcjGG9u3ZFx1coXiPcXVMYZmCQpt?= =?utf-8?q?0CXmW7td5HFxjmVzAvVZSAz6bg2zcROmmHh34NUQk4QHDU30tD1n+o33gSh51ftkU?= =?utf-8?q?yrnSTiRWzmcNmTVisnfpVOdlO2GqseWGUirDv8eJsa8Bjb6MkXLrSCaPmeYAeI5Pl?= =?utf-8?q?3vIdTrGmNDR4D4wY9Ak26o3ovCyMxxV2wP8+vpcTohLHHaG6G6Tr+Ix+YcCYy7RAQ?= =?utf-8?q?qPDuiDUxya2MyCFsFnGLOjAmF4P+patHIffpfXD+Uatl4eMvsYG/rSzDZRUSdsFMe?= =?utf-8?q?uiGxVUejdvuRgd3vqPKx9bY/gVa5EU4Dd+/KZYpv214KJpRbl2hRu7/34FgyBJgjS?= =?utf-8?q?08thu17gYKoQkqrImEH5224ZqhsbDxvQXKntxwwcjjzSqR85Pb/RleI10R8mYEDpI?= =?utf-8?q?+0fGK80uoMR7K5xOD9Qey6WnzJc1FsbxLGUouRDSPPau2E/8qKvZiX/ndTNLaxI6f?= =?utf-8?q?4/afYhjBFAr7kTRayHs8kQJgdM9ntk0y01iUf+2IjzYnH/JkYJ+GSuaxpP33SzU2E?= =?utf-8?q?W+ySel3j9qe8rfltmukSTpU71OTowhGt/vCuecd50fUQzFC5kDCM6CPfGafb3/OsA?= =?utf-8?q?dHDy/waSN4Zb9EdtjIkqMh+sRvLU4QNfdDJGLEMcHpX0JcbbDV5zbvIenZ3AH6iL/?= =?utf-8?q?bpU9V5hMIH981iP2WkqGFN7P4s65rjoVhWoTz4trSDBQFXcGiA3ZwAj874Hd4ijPt?= =?utf-8?q?1nHi+vctlNwYbKnwITwbD5H0iQrvdyedVBHJJrC6Gt0te2N4PrDKU2YHmhyztZnxQ?= =?utf-8?q?l6kU6JjRJ4ck1rhitFPn4rOaGWHFFKMftGVDdpaXPeVOoxImVDDgRMm/pRgaYoPr2?= =?utf-8?q?X7J+PAY2MSYQDjjftLTUWH1OpXBlV+edup6hSS70cvj//3FRkZvIjnootK54tlgtB?= =?utf-8?q?eQabkyrHJTro9PP3sy/7H+XfhloOrG6MpqjfPB07dEodsfrPNijfxsLyjeBMqqt4w?= =?utf-8?q?3gkVyP4jaDl+efg70UAZhUxjkpf72higjHi7XcTIYfoWWA68EK2RAi9nVedhy7jx9?= =?utf-8?q?7wTyLQamii22?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(7416014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?V5ovix0+NYS/a+/cAugwpZuGqKNX?= =?utf-8?q?2OSEqSmNpnvvwYuvvnxUNWOkRmC4ooT34mWt0Svrwl+SwhdGvWGimhOdtv+9xWoyO?= =?utf-8?q?/F5rui3fo4wTCGFabMpr639Tc0DXKgOkTNVtIPb/b6Q9GIbry+d8aZMsiFWkW6qc9?= =?utf-8?q?j9nZFZV7sJnWVdPOBLL1MaUurg8cgY50GscAVkjMyo9dyHULaZR6UpzLLnXjyLkZk?= =?utf-8?q?A4S2LuGEhERuB3a1Lt0RYcyMUpK5DO6WoD8I90SoZQ6t3iEXTSegub1BnNbg/oDZz?= =?utf-8?q?5DCf2Uh1SiY/gaJyogKhpqVk2elv3CPxkEu3WcnTFWXkLWDNhY3mEJb28cvCg3j8A?= =?utf-8?q?KBxPorMuDnlrPV3vUpQEnGm1YOOF6oQb3p8eACsJlZJ4mfNIA3R8NuF+Hm5Li1QKd?= =?utf-8?q?ziOgjE/nSgtqMmqFDAja9TIBrHoermsihqGCMWguaLdgnNq8IaSlf+JmhE917WM25?= =?utf-8?q?hZvJ1mCbb7D5wptudOZzznWjNrQdg5z3apoTG59QrBPaG0bwqziHo1uYuzb1MlGkR?= =?utf-8?q?CVOq3M1/qFPrInBK+j+Ntyn3QihghZkzJPLbw21tnJsf8dHAzweo/vZy6SKjQEAjH?= =?utf-8?q?uM1mqQy3zybma/F7PF7o2PJTsdbrtj0t1+LqlNz29tjYlTKFe6mLX1Zr2SaEidqMx?= =?utf-8?q?jQa3dr2drV7GGEltAIIvpXbrW59hD23pQmJTKY9Z9UoXejqMJFJumZDAbKe5L6gaf?= =?utf-8?q?z+Vw9RbheA2Q3eM+gnNdBmLPz0s0HQCfmdiiyXz7fDWMwmXNb6GY7LgC2nul+TvdP?= =?utf-8?q?YgZM3K4IfaktMOqTdLgfJ3LRhUGHzm83qmc8/WWzO8OvKZ7QDIviDpogjLabtnvZZ?= =?utf-8?q?jhtGnstUMeiZFjOGY7s/kI5gFX+DX2GQxcJRDUhjhGDVYAjtmnK+ShF8+040T9kGi?= =?utf-8?q?LAwVkX87RfdBzUSMe+gXbHg8YfV+J2vytRpVN4s1cyPG4iuw7CFLIwtqNiM+SIjUY?= =?utf-8?q?mRS/6kl9qkJJqtCZE5ACO8ar5xxhQR6kBo+Y2HXT2jbMQ9r5IOoxi87qP16aZmJAW?= =?utf-8?q?cvBXt8Kwlu0P27Ut2A1NBawDNQo9SE1zvaJBx9+b6pqsZoi4J3MvQXKU0EftxvYom?= =?utf-8?q?oB/FrcQWgLD8qz11edE3Bn8FWB7jxvyUetqefPKMiCrSu4+eMdguCnVczoF7zoSzU?= =?utf-8?q?kN9QT0xRRVzQ6Xze5U0cTuht+p4IIL1BSjH8Wi+haH8b4GyXsB8Dl26VjULcPM5SD?= =?utf-8?q?4JdPFl98e4RFxc8kHZIdHB1/1ovCty3ZL38ZGQSWf6YfVnjIsKk03YTv3vb3Xw7OS?= =?utf-8?q?oEGu///L1sAmmTIvwZLcLsug7FBeQgBtRbZJsnN9G4rS5ZuXQgfG0CvwG7jk67D6F?= =?utf-8?q?zsLAAMYuEnQmV6Z5z2kuidPaCWsKOvmV+snIjt47ri/TF5tRVWsKTTwZDC5f+xhKc?= =?utf-8?q?glsHLr0MTZ9HfkrBvztpxCvI/nwnEYoHj/7n9nDYb+gXVpGHVvzhCJ7WGhg8zL/1q?= =?utf-8?q?UPDg8+sMyjxZJv+rnY3UsZWbxbs0UbSJXBx18NcgmMSK1cJbhS9ZTOYE=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f517831d-5524-43ac-ea6a-08dd04ff11de X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2024 22:52:52.1050 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Fl9ib7iqRwolJNWXg+Auwzn9ixquKVwfarFWDQgeLNblKnGrRP2m9ec6sULXM3upzi3WumdCoI1pua+ABkOJcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DUZPR04MB9967 ┌────────────┐ ┌───────────────────────────────────┐ ┌────────────────┐ │ │ │ │ │ │ │ │ │ PCI Endpoint │ │ PCI Host │ │ │ │ │ │ │ │ │◄──┤ 1.platform_msi_domain_alloc_irqs()│ │ │ │ │ │ │ │ │ │ MSI ├──►│ 2.write_msi_msg() ├──►├─BAR │ │ Controller │ │ update doorbell register address│ │ │ │ │ │ for BAR │ │ │ │ │ │ │ │ 3. Write BAR│ │ │◄──┼───────────────────────────────────┼───┤ │ │ │ │ │ │ │ │ ├──►│ 4.Irq Handle │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └────────────┘ └───────────────────────────────────┘ └────────────────┘ This patches based on old https://lore.kernel.org/imx/20221124055036.1630573-1-Frank.Li@nxp.com/ Original patch only target to vntb driver. But actually it is common method. This patches add new API to pci-epf-core, so any EP driver can use it. Previous v2 discussion here. https://lore.kernel.org/imx/20230911220920.1817033-1-Frank.Li@nxp.com/ Changes in v7: - Add helper function pci_epf_align_addr(); - Link to v6: https://lore.kernel.org/r/20241112-ep-msi-v6-0-45f9722e3c2a@nxp.com Changes in v6: - change doorbell_addr to doorbell_offset - use round_down() - add Niklas's test by tag - rebase to pci/endpoint - Link to v5: https://lore.kernel.org/r/20241108-ep-msi-v5-0-a14951c0d007@nxp.com Changes in v5: - Move request_irq to epf test function driver for more flexiable user case - Add fixed size bar handler - Some minor improvememtn to see each patches's changelog. - Link to v4: https://lore.kernel.org/r/20241031-ep-msi-v4-0-717da2d99b28@nxp.com Changes in v4: - Remove patch genirq/msi: Add cleanup guard define for msi_lock_descs()/msi_unlock_descs() - Use new method to avoid compatible problem. Add new command DOORBELL_ENABLE and DOORBELL_DISABLE. pcitest -B send DOORBELL_ENABLE first, EP test function driver try to remap one of BAR_N (except test register bar) to ITS MSI MMIO space. Old driver don't support new command, so failure return, not side effect. After test, DOORBELL_DISABLE command send out to recover original map, so pcitest bar test can pass as normal. - Other detail change see each patches's change log - Link to v3: https://lore.kernel.org/r/20241015-ep-msi-v3-0-cedc89a16c1a@nxp.com Change from v2 to v3 - Fixed manivannan's comments - Move common part to pci-ep-msi.c and pci-ep-msi.h - rebase to 6.12-rc1 - use RevID to distingiush old version mkdir /sys/kernel/config/pci_ep/functions/pci_epf_test/func1 echo 16 > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/msi_interrupts echo 0x080c > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/deviceid echo 0x1957 > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/vendorid echo 1 > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/revid ^^^^^^ to enable platform msi support. ln -s /sys/kernel/config/pci_ep/functions/pci_epf_test/func1 /sys/kernel/config/pci_ep/controllers/4c380000.pcie-ep - use new device ID, which identify support doorbell to avoid broken compatility. Enable doorbell support only for PCI_DEVICE_ID_IMX8_DB, while other devices keep the same behavior as before. EP side RC with old driver RC with new driver PCI_DEVICE_ID_IMX8_DB no probe doorbell enabled Other device ID doorbell disabled* doorbell disabled* * Behavior remains unchanged. Change from v1 to v2 - Add missed patch for endpont/pci-epf-test.c - Move alloc and free to epc driver from epf. - Provide general help function for EPC driver to alloc platform msi irq. - Fixed manivannan's comments. To: Manivannan Sadhasivam To: Krzysztof Wilczyński To: Kishon Vijay Abraham I To: Bjorn Helgaas To: Arnd Bergmann To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: imx@lists.linux.dev Cc: Niklas Cassel Cc: cassel@kernel.org Cc: dlemoal@kernel.org Cc: maz@kernel.org Cc: tglx@linutronix.de Cc: jdmason@kudzu.us Signed-off-by: Frank Li Tested-by: Niklas Cassel --- Frank Li (6): PCI: endpoint: Add pci_epc_get_fn() API for customizable filtering PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller PCI: endpoint: Add pci_epf_align_addr() helper for address alignment PCI: endpoint: pci-epf-test: Add doorbell test support misc: pci_endpoint_test: Add doorbell test case tools: PCI: Add 'B' option for test doorbell drivers/misc/pci_endpoint_test.c | 71 ++++++++++++++++ drivers/pci/endpoint/Makefile | 2 +- drivers/pci/endpoint/functions/pci-epf-test.c | 117 ++++++++++++++++++++++++++ drivers/pci/endpoint/pci-ep-msi.c | 99 ++++++++++++++++++++++ drivers/pci/endpoint/pci-epc-core.c | 23 ++++- drivers/pci/endpoint/pci-epf-core.c | 39 +++++++++ include/linux/pci-ep-msi.h | 15 ++++ include/linux/pci-epc.h | 2 + include/linux/pci-epf.h | 29 +++++++ include/uapi/linux/pcitest.h | 1 + tools/pci/pcitest.c | 16 +++- 11 files changed, 410 insertions(+), 4 deletions(-) --- base-commit: f5373677e13177cfc7875f44a864f9a1db751df9 change-id: 20241010-ep-msi-8b4cab33b1be Best regards, --- Frank Li