From nobody Wed Apr 15 16:43:15 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 10ED63451AE for ; Wed, 4 Mar 2026 12:09:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772626201; cv=none; b=tYtiw3aZ84pvm/xsgST9B8NoaX0fSXHv3aJNBVbhz80fl42Dcf+RPVpXlRCdnOW6qYC4z8dKiCAiE3zq58dhfXWdoYPd27KrbPaFm+c0vnT7Jo4hGU5wbLYaXBOYwr6dKn7dQPVjLGH43KUWWAb1xXPvMh1Yt83nG0kKLYTbZP4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772626201; c=relaxed/simple; bh=2XaEhjC6FjGTzT08T+y5cGL3Injo2DGl7GmSiMMPI48=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=UF3KWegqym8zoJ27dN/ZGqohzetrmExUdMPuLZMfZ3oNW+vuggp37MbHjOWFCJ0VOb/BtmHCzygagta54td+TLj6qbfygOq9+bTyqnBaWOz18ERIFqXBGh0FykPXbkP4xKtk4a/hXKy7ChRhfTioK7hlTeqM86Av4RYDf2Mhf8A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B93A8339; Wed, 4 Mar 2026 04:09:51 -0800 (PST) Received: from e129823.cambridge.arm.com (e129823.arm.com [10.1.197.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 295E33F836; Wed, 4 Mar 2026 04:09:57 -0800 (PST) From: Yeoreum Yun To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: sudeep.holla@kernel.org, Yeoreum Yun Subject: [PATCH] firmware: arm_ffa: remove vm_id argument in ffa_rxtx_unmap() Date: Wed, 4 Mar 2026 12:09:53 +0000 Message-Id: <20260304120953.847671-1-yeoreum.yun@arm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" According to the FF-A specification [0], section 13.7 (FFA_RXTX_UNMAP), w1 must be zero when called from a guest: - w1: ID of the VM that allocated the RX/TX buffer. Only valid in the Non-secure physical FF-A instance. MBZ otherwise. The w1 field is only meaningful when FFA_RXTX_UNMAP is invoked from the hypervisor. In the case of a Non-secure physical partition, the partition ID is always 0. In the case of a VM, w1 must also be zero. Therefore, there is no need to pass a vm_id (partition id) to ffa_rxtx_unmap(); doing so would result in FFA_INVALID_PARAMETER when vm_id > 0. To address this, remove the vm_id argument from ffa_rxtx_unmap(). Fixes: 3bbfe9871005 ("firmware: arm_ffa: Add initial Arm FFA driver support= ") Link: https://developer.arm.com/documentation/den0077/latest [0] Signed-off-by: Yeoreum Yun --- drivers/firmware/arm_ffa/driver.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/d= river.c index 12a625387d6e..f2f94d4d533e 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -205,12 +205,12 @@ static int ffa_rxtx_map(phys_addr_t tx_buf, phys_addr= _t rx_buf, u32 pg_cnt) return 0; } -static int ffa_rxtx_unmap(u16 vm_id) +static int ffa_rxtx_unmap(void) { ffa_value_t ret; invoke_ffa_fn((ffa_value_t){ - .a0 =3D FFA_RXTX_UNMAP, .a1 =3D PACK_TARGET_INFO(vm_id, 0), + .a0 =3D FFA_RXTX_UNMAP, }, &ret); if (ret.a0 =3D=3D FFA_ERROR) @@ -2097,7 +2097,7 @@ static int __init ffa_init(void) pr_err("failed to setup partitions\n"); ffa_notifications_cleanup(); - ffa_rxtx_unmap(drv_info->vm_id); + ffa_rxtx_unmap(); free_pages: if (drv_info->tx_buffer) free_pages_exact(drv_info->tx_buffer, rxtx_bufsz); @@ -2112,7 +2112,7 @@ static void __exit ffa_exit(void) { ffa_notifications_cleanup(); ffa_partitions_cleanup(); - ffa_rxtx_unmap(drv_info->vm_id); + 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); -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}