From nobody Sat Jun 13 07:50:37 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 F17B04219E8; Fri, 8 May 2026 17:54:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778262891; cv=none; b=HKDM5Duy82b4lvKug/AXU3StYYKcrw2SEl8Qc/fsslbprQfNTTZJtpqWE4eYNJ3Sw4fHlb9Yk1Bsr+4dW8fYCkBn1NWpCDs7yzK9fQVFb7zrkW6vbfynsRcVWxsCZW3qMKT6vxGA0O2pc4f0HOcYCywk116nLlUTJO90DPx22go= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778262891; c=relaxed/simple; bh=1dYHe65DV95VZFN3CAYebqbE8uRbj3es6XTQIjoGPRk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=olI95iFTqBRvCqSmZcMTjPEEOJdi5BoiDOdbX21AXt7+yAxsZd1yDpP2duhbZflylqVxHtKHLoKp5oaVlNW5DQa69+yUttDUBTRNnP52BI4yW3iWez+68nuyeevSlC6CIxSwHuI2Sbmyi0ktPI79XopdPSwr4DB4YFAScOz5jiQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PPSfo/+f; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PPSfo/+f" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78217C2BCB0; Fri, 8 May 2026 17:54:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778262890; bh=1dYHe65DV95VZFN3CAYebqbE8uRbj3es6XTQIjoGPRk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PPSfo/+fVPkzA3bjANTm5g4wn4Evv6yw/bSsW+NMe0DrTNkOaoWnCKoLLs3oQTIjG Z4D7xL+JcM8ltnRKhkaHpRtU4p5O2bpm1e2PFn3sFjQd1AG5CXrhFVm7NczV5683VY l7TnUIRUTbpspdRWPw4cK0gGtf9ze1zSIcXtmeCkvwAJvmZ6X7SEJtqxjWq06vvO0e f5JCBxegxjmZR0mRCibXUZX3Pu2Qr11x5Nj1rT4Mdt7Jn3lmN3ch3FZU0z6WqR7LA8 5ipEQuTEqCIahOdbRea2e1Ck4T/v1X+RnOzM4OPRQZsWbVQa0uoTnX95Q6mht3oHKA J/lJ84hYxHZGg== From: Sudeep Holla Date: Fri, 08 May 2026 18:54:15 +0100 Subject: [PATCH 1/4] Revert "firmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-b4-ffa_plat_dev-v1-1-c5a30f8cf7b8@kernel.org> References: <20260508-b4-ffa_plat_dev-v1-0-c5a30f8cf7b8@kernel.org> In-Reply-To: <20260508-b4-ffa_plat_dev-v1-0-c5a30f8cf7b8@kernel.org> To: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Cc: Sudeep Holla , Yeoreum Yun X-Mailer: b4 0.15.2 From: Yeoreum Yun This reverts commit 0e0546eabcd6c19765a8dbf5b5db3723e7b0ea75, which was added to address ordering issues with the IMA LSM initialisation where the TPM would not be fully ready by the time IMA wanted it. This has been resolved within IMA by retrying setup during late_initcall_sync if the TPM is not available at first. Signed-off-by: Yeoreum Yun Signed-off-by: Sudeep Holla --- drivers/firmware/arm_ffa/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/d= river.c index eb2782848283..6efb85787e6e 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -2106,7 +2106,7 @@ static int __init ffa_init(void) kfree(drv_info); return ret; } -rootfs_initcall(ffa_init); +module_init(ffa_init); =20 static void __exit ffa_exit(void) { --=20 2.43.0 From nobody Sat Jun 13 07:50:37 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 842AC421F1A; Fri, 8 May 2026 17:54:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778262892; cv=none; b=lQvwAhxeU+Tsqg2e+I4U1FFOuuEVk3neyazk3UQ1DprpieiZM3sX6qPdi+uvtTWmze9w3wQuVQx7XuRhzXSuQ0aPO9l25xeeNcNshvvlr9ea74bAI8gOD4DmPVYZlayo/ekhtNJ6lzkE29rcHRzHsa3vsftQRc4otCZhJ+/18qk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778262892; c=relaxed/simple; bh=TBNCVdCAkWh6fuk6mWj5LJxZtMNMIwaTT5dZw7QeK68=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jX9hUXAJSZEZzL06aLrScbvcfTmYkgIZjoazErpKS1tMfv4fqXKZ2688AHofAgrol0hmmRIHcxPoAxzLshdEiT9NgNk57r/MSzHHD8mQJmNnFSy3HV5eyzAq8mDTd9x+gE15fM6fqjKJaIg8tn+xGQM6mJ9F2Jyod2FQT4G1zD0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l3dTWKD2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l3dTWKD2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8101C2BCC9; Fri, 8 May 2026 17:54:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778262892; bh=TBNCVdCAkWh6fuk6mWj5LJxZtMNMIwaTT5dZw7QeK68=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=l3dTWKD2wfcguZP+/OHzH19sdBUsw/L7rr18YgiFZbK5cQGE6IdVuFa5WgTLNOCtM gEPNfUnj2IumN7lbKpEABu/LhnxZ43r6Xm2Icl4Nn8Hu5i+Ub9DLXx4/6LYLDMYo/H +pixvF6Mj1ADqRKvzNAQ4ft614vTenUFfOIo7xAqnNp9lhXSQBMwaMRlH47CRzpq4N 1ev3iagxEV1pvrA3RtFmYh9h/AuuzU8DjofVDwcww7ZiYH8L7+8rLOwo56NmoCqBhq qcdXpH8kt6JxQwtzRBCKNvUBD8mLF08A6CqUIQPw+1tyulyxbRzgFQw9a6fqaRA0U5 Uuio0xPf010mw== From: Sudeep Holla Date: Fri, 08 May 2026 18:54:16 +0100 Subject: [PATCH 2/4] firmware: arm_ffa: Register core as a platform driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-b4-ffa_plat_dev-v1-2-c5a30f8cf7b8@kernel.org> References: <20260508-b4-ffa_plat_dev-v1-0-c5a30f8cf7b8@kernel.org> In-Reply-To: <20260508-b4-ffa_plat_dev-v1-0-c5a30f8cf7b8@kernel.org> To: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Cc: Sudeep Holla , Yeoreum Yun X-Mailer: b4 0.15.2 Move the FF-A core bring-up and teardown paths into platform driver probe and remove callbacks, and register a synthetic arm-ffa platform device to bind the driver. This makes the FF-A core lifetime follow the driver model while keeping the device creation internal to the FF-A core. Use normal platform driver registration so the probe path has standard driver-core semantics. The synthetic platform device is a temporary bridge until ACPI and devicetree describe the FF-A core device or object. Once those firmware description paths are defined, the internal platform device creation can be dropped and the driver can bind to the firmware-described device directly. Since the transport selection now happens from the platform probe path, drop the __init annotation from ffa_transport_init(). Signed-off-by: Sudeep Holla Reviewed-by: Yeoreum Yun --- drivers/firmware/arm_ffa/common.h | 4 +-- drivers/firmware/arm_ffa/driver.c | 53 ++++++++++++++++++++++++++++++++++-= ---- drivers/firmware/arm_ffa/smccc.c | 2 +- 3 files changed, 50 insertions(+), 9 deletions(-) diff --git a/drivers/firmware/arm_ffa/common.h b/drivers/firmware/arm_ffa/c= ommon.h index 9c6425a81d0d..5cdf4bd222c6 100644 --- a/drivers/firmware/arm_ffa/common.h +++ b/drivers/firmware/arm_ffa/common.h @@ -18,9 +18,9 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev); void ffa_device_match_uuid(struct ffa_device *ffa_dev, const uuid_t *uuid); =20 #ifdef CONFIG_ARM_FFA_SMCCC -int __init ffa_transport_init(ffa_fn **invoke_ffa_fn); +int ffa_transport_init(ffa_fn **invoke_ffa_fn); #else -static inline int __init ffa_transport_init(ffa_fn **invoke_ffa_fn) +static inline int ffa_transport_init(ffa_fn **invoke_ffa_fn) { return -EOPNOTSUPP; } diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/d= river.c index 6efb85787e6e..97ecdb5dac09 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,7 @@ =20 #define FFA_DRIVER_VERSION FFA_VERSION_1_2 #define FFA_MIN_VERSION FFA_VERSION_1_0 +#define FFA_PLATFORM_NAME "arm-ffa" =20 #define SENDER_ID_MASK GENMASK(31, 16) #define RECEIVER_ID_MASK GENMASK(15, 0) @@ -114,6 +116,7 @@ struct ffa_drv_info { }; =20 static struct ffa_drv_info *drv_info; +static struct platform_device *ffa_pdev; =20 /* * The driver must be able to support all the versions from the earliest @@ -2029,7 +2032,7 @@ static void ffa_notifications_setup(void) ffa_notifications_cleanup(); } =20 -static int __init ffa_init(void) +static int ffa_probe(struct platform_device *pdev) { int ret; u32 buf_sz; @@ -2042,6 +2045,7 @@ static int __init ffa_init(void) drv_info =3D kzalloc_obj(*drv_info); if (!drv_info) return -ENOMEM; + platform_set_drvdata(pdev, drv_info); =20 ret =3D ffa_version_check(&drv_info->version); if (ret) @@ -2103,19 +2107,56 @@ static int __init ffa_init(void) free_pages_exact(drv_info->tx_buffer, rxtx_bufsz); free_pages_exact(drv_info->rx_buffer, rxtx_bufsz); free_drv_info: + platform_set_drvdata(pdev, NULL); kfree(drv_info); + drv_info =3D NULL; return ret; } -module_init(ffa_init); =20 -static void __exit ffa_exit(void) +static void ffa_remove(struct platform_device *pdev) { + struct ffa_drv_info *info =3D platform_get_drvdata(pdev); + ffa_notifications_cleanup(); ffa_partitions_cleanup(); ffa_rxtx_unmap(); - free_pages_exact(drv_info->tx_buffer, drv_info->rxtx_bufsz); - free_pages_exact(drv_info->rx_buffer, drv_info->rxtx_bufsz); - kfree(drv_info); + free_pages_exact(info->tx_buffer, info->rxtx_bufsz); + free_pages_exact(info->rx_buffer, info->rxtx_bufsz); + kfree(info); + platform_set_drvdata(pdev, NULL); + drv_info =3D NULL; +} + +static struct platform_driver ffa_driver =3D { + .probe =3D ffa_probe, + .remove =3D ffa_remove, + .driver =3D { + .name =3D FFA_PLATFORM_NAME, + }, +}; + +static int __init ffa_init(void) +{ + int ret; + + ffa_pdev =3D platform_device_register_simple(FFA_PLATFORM_NAME, + PLATFORM_DEVID_NONE, + NULL, 0); + if (IS_ERR(ffa_pdev)) + return PTR_ERR(ffa_pdev); + + ret =3D platform_driver_register(&ffa_driver); + if (ret) + platform_device_unregister(ffa_pdev); + + return ret; +} +module_init(ffa_init); + +static void __exit ffa_exit(void) +{ + platform_device_unregister(ffa_pdev); + platform_driver_unregister(&ffa_driver); } module_exit(ffa_exit); =20 diff --git a/drivers/firmware/arm_ffa/smccc.c b/drivers/firmware/arm_ffa/sm= ccc.c index 4d85bfff0a4e..e6125dd9f58f 100644 --- a/drivers/firmware/arm_ffa/smccc.c +++ b/drivers/firmware/arm_ffa/smccc.c @@ -17,7 +17,7 @@ static void __arm_ffa_fn_hvc(ffa_value_t args, ffa_value_= t *res) arm_smccc_1_2_hvc(&args, res); } =20 -int __init ffa_transport_init(ffa_fn **invoke_ffa_fn) +int ffa_transport_init(ffa_fn **invoke_ffa_fn) { enum arm_smccc_conduit conduit; =20 --=20 2.43.0 From nobody Sat Jun 13 07:50:37 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E693E274FDF; Fri, 8 May 2026 17:54:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778262894; cv=none; b=d5PbtjToPIsNSiRWcSYQbMGo82ep7wPSDF3NkxrPwMQh9/QYgamHU3InjXwCPxplwG6i6GYFDhky/BeeU8iXYdzDlll/h/3dvAXKg6UYAXtDnHj9lghzK/eyp53tbzZMxEYakE2QJJFRyFGkZC1tc5dijRW0xnyjTe975GxDBzI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778262894; c=relaxed/simple; bh=VfeMzXxIblsKxvlWKcJteZkeQp7sM+pCydv1aje8okc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ib0GCqOG/izrxkYQ/Fk6n4KAr0ZnQt4NtTEUIgP/oHpFuCQoWnPpRTbA4GCxSZIw0BSoVIUNMnSG4Wmxlpadphu4dZWs5efE75yN2ygk1aBHZCqO5VhSyEuu69ZKOhK41BYL7rVQI59iPC1E/eIxVuZyT6RQZE11ENnw0UAmaC8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cKrb0dUE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cKrb0dUE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 642DDC2BCF4; Fri, 8 May 2026 17:54:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778262893; bh=VfeMzXxIblsKxvlWKcJteZkeQp7sM+pCydv1aje8okc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=cKrb0dUEWFnriGehqYSX4zQQL9iWfQmtv8wNfJ9dbay2K3d3Ok0Om1aHk0H4g8hWv tUYHMEBVI9ReomR4aPTTa0GXp5t/Rx7T+nH67Eit4m2PyHZS7gc8Ay1oVbN1KrStbf i4WycSaOVP373FqPSZo4NFou7OZbOcsiWXuMVb4/DsH/+wqLHW8plnWrzd3KQqOXJQ 58rniNWNyais+DTMdfjAh55smCxHH1OUdXRGiXfyjSJa4e/Pj22HsQ1WFSrHCX+Wgq JFKqljIM1d/aQ0lguLEUm5h+n585HfrTKIQpE3q7UiG1BdQVpywWv+NwTi5JSMizdh HR/A5mOYtAYKA== From: Sudeep Holla Date: Fri, 08 May 2026 18:54:17 +0100 Subject: [PATCH 3/4] firmware: arm_ffa: Set the core device as FF-A device parent Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-b4-ffa_plat_dev-v1-3-c5a30f8cf7b8@kernel.org> References: <20260508-b4-ffa_plat_dev-v1-0-c5a30f8cf7b8@kernel.org> In-Reply-To: <20260508-b4-ffa_plat_dev-v1-0-c5a30f8cf7b8@kernel.org> To: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Cc: Sudeep Holla , Yeoreum Yun X-Mailer: b4 0.15.2 Pass a parent device into ffa_device_register() and use the synthetic arm-ffa platform device as the parent for each registered FF-A device. This keeps the enumerated FF-A partition devices anchored below the FF-A core device in the driver model, matching the platform-driver conversion of the core transport. Suggested-by: Yeoreum Yun Signed-off-by: Sudeep Holla Reviewed-by: Yeoreum Yun --- drivers/firmware/arm_ffa/bus.c | 3 ++- drivers/firmware/arm_ffa/driver.c | 5 +++-- include/linux/arm_ffa.h | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c index 9576862d89c4..e05fe0b6049c 100644 --- a/drivers/firmware/arm_ffa/bus.c +++ b/drivers/firmware/arm_ffa/bus.c @@ -190,7 +190,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev) =20 struct ffa_device * ffa_device_register(const struct ffa_partition_info *part_info, - const struct ffa_ops *ops) + const struct ffa_ops *ops, struct device *parent) { int id, ret; struct device *dev; @@ -210,6 +210,7 @@ ffa_device_register(const struct ffa_partition_info *pa= rt_info, } =20 dev =3D &ffa_dev->dev; + dev->parent =3D parent; dev->bus =3D &ffa_bus_type; dev->release =3D ffa_release_device; dev->dma_mask =3D &dev->coherent_dma_mask; diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/d= river.c index 97ecdb5dac09..e9d7dc71c06d 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -1688,7 +1688,7 @@ static int ffa_setup_host_partition(int vm_id) int ret; =20 buf.id =3D vm_id; - ffa_dev =3D ffa_device_register(&buf, &ffa_drv_ops); + ffa_dev =3D ffa_device_register(&buf, &ffa_drv_ops, &ffa_pdev->dev); if (!ffa_dev) { pr_err("%s: failed to register host partition ID 0x%x\n", __func__, vm_id); @@ -1758,7 +1758,8 @@ static int ffa_setup_partitions(void) * provides UUID here for each partition as part of the * discovery API and the same is passed. */ - ffa_dev =3D ffa_device_register(tpbuf, &ffa_drv_ops); + ffa_dev =3D ffa_device_register(tpbuf, &ffa_drv_ops, + &ffa_pdev->dev); if (!ffa_dev) { pr_err("%s: failed to register partition ID 0x%x\n", __func__, tpbuf->id); diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h index 81e603839c4a..17eca3dfc59e 100644 --- a/include/linux/arm_ffa.h +++ b/include/linux/arm_ffa.h @@ -173,7 +173,7 @@ struct ffa_partition_info; #if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT) struct ffa_device * ffa_device_register(const struct ffa_partition_info *part_info, - const struct ffa_ops *ops); + const struct ffa_ops *ops, struct device *parent); void ffa_device_unregister(struct ffa_device *ffa_dev); int ffa_driver_register(struct ffa_driver *driver, struct module *owner, const char *mod_name); @@ -184,7 +184,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev); #else static inline struct ffa_device * ffa_device_register(const struct ffa_partition_info *part_info, - const struct ffa_ops *ops) + const struct ffa_ops *ops, struct device *parent) { return NULL; } --=20 2.43.0 From nobody Sat Jun 13 07:50:37 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 76C3B421F0B; Fri, 8 May 2026 17:54:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778262895; cv=none; b=B3yV4ddwwZVviChvE4KHmWKi3Tx6plAqh+P7DQU1hIwNmbhTtqZvXJHF5n45SMbASst+MRgCj2rfPnSISzjw//Ujgk1H8xDoMRwvzcFCyS9aMdQqaiAmTZBWAQUL7NljGghMv/jzTpImjUGKih5OaMGtsNfUVy9wBDWdg0TlXvo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778262895; c=relaxed/simple; bh=/aEr/2bl24rcHpe9c/rW9BGCQVs8Vg6IaLcMsIwTuCQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PErSkRdHM1P8UQqP7JEkAVwL3mwX+xzfdi4IXzyVT+8ZpMefvwZAmEHBfFUuLL98I8t3j1f1JGdfTTn5WsvRv5kSdGn9M6wBrbKEYIXaMUmsR86QLTHDeCZj8KfFvKN00ifcKBOCQSP/BwPslGTwq9gkkTLl42aGLa3TezaequU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ndN56qyU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ndN56qyU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4A06C2BCF5; Fri, 8 May 2026 17:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778262895; bh=/aEr/2bl24rcHpe9c/rW9BGCQVs8Vg6IaLcMsIwTuCQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ndN56qyUqTs+ESpRsl3NSQPAcyFXCT94hgHpwL7EIhSbzah5StjeDU8Ll58UtHaBP ma3w2CiGVaFY0Q0zKvvBJCDgbzTAzR8pHAHQWMMGkYqIGUUnGRE7nYiTN13E+E8BaP u4hRvuTDUSHLbemPqVGlGqYYOXCZBHCVDkhsuy5VCoBk1L++sbHclUXnuW8KC3zSfU QT8rSe/GCfm7+M6yX+QckmUCENMJCQffoPQi6xJdxO16CaKfKJKXpdQsOLWGbuC50y EuUxL3jKhuEzg4Mb0O5ZXJqUpzyYR4zRbO4cZF2CaAVKCYOY7AaGIjho7zehSkoHR7 IkRIV3aVGllSg== From: Sudeep Holla Date: Fri, 08 May 2026 18:54:18 +0100 Subject: [PATCH 4/4] firmware: arm_ffa: Defer probe until pKVM is initialized Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260508-b4-ffa_plat_dev-v1-4-c5a30f8cf7b8@kernel.org> References: <20260508-b4-ffa_plat_dev-v1-0-c5a30f8cf7b8@kernel.org> In-Reply-To: <20260508-b4-ffa_plat_dev-v1-0-c5a30f8cf7b8@kernel.org> To: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Cc: Sudeep Holla , Yeoreum Yun X-Mailer: b4 0.15.2 When protected KVM is enabled, the kernel includes a pKVM FF-A proxy that sits in front of the normal FF-A driver. The proxy has to perform its own FF-A version negotiation and setup first, so that it can mediate subsequent FF-A traffic correctly. Defer FF-A core probing until pKVM has completed initialization. This keeps the normal driver from negotiating the FF-A version or performing other transport setup before the pKVM proxy is ready, and lets the driver model retry probing once the protected KVM state required by the FF-A transport is available. Suggested-by: Yeoreum Yun Signed-off-by: Sudeep Holla Reviewed-by: Yeoreum Yun --- drivers/firmware/arm_ffa/driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/d= river.c index e9d7dc71c06d..1fba064c2aba 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -43,6 +43,8 @@ #include #include =20 +#include + #include "common.h" =20 #define FFA_DRIVER_VERSION FFA_VERSION_1_2 @@ -2039,6 +2041,10 @@ static int ffa_probe(struct platform_device *pdev) u32 buf_sz; size_t rxtx_bufsz =3D SZ_4K; =20 + if (IS_BUILTIN(CONFIG_ARM_FFA_TRANSPORT) && + is_protected_kvm_enabled() && !is_pkvm_initialized()) + return -EPROBE_DEFER; + ret =3D ffa_transport_init(&invoke_ffa_fn); if (ret) return ret; --=20 2.43.0