From patchwork Wed Jul 5 09:34:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 13301894 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8DD96C001B0 for ; Wed, 5 Jul 2023 09:39:42 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.558926.873535 (Exim 4.92) (envelope-from ) id 1qGyys-0007Ni-VL; Wed, 05 Jul 2023 09:39:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 558926.873535; Wed, 05 Jul 2023 09:39:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qGyys-0007Nb-Qh; Wed, 05 Jul 2023 09:39:26 +0000 Received: by outflank-mailman (input) for mailman id 558926; Wed, 05 Jul 2023 09:39:25 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qGyvI-0005bC-I6 for xen-devel@lists.xenproject.org; Wed, 05 Jul 2023 09:35:44 +0000 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [2a00:1450:4864:20::236]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4f0d355d-1b17-11ee-8611-37d641c3527e; Wed, 05 Jul 2023 11:35:42 +0200 (CEST) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b69dcf45faso105699081fa.0 for ; Wed, 05 Jul 2023 02:35:42 -0700 (PDT) Received: from rayden.urgonet (h-46-59-78-111.A175.priv.bahnhof.se. [46.59.78.111]) by smtp.gmail.com with ESMTPSA id q22-20020a2e84d6000000b002b6d8cfb6d2sm2910625ljh.140.2023.07.05.02.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 02:35:40 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4f0d355d-1b17-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688549741; x=1691141741; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=l0XHslbV1muN4VtuaM4zruuvudWXBg6/E8tWHxT1G2w=; b=f899ZIKOky2C3a7sro1D/PW5bsGIsjNat/XajNAkKNjim/maYyRXaufJNUm8Khzrer H90b+A+uxSsw4GWLkTMWL/FxYHSseZQVqgxYjBaxFpPFXnY3F0TNmwbMB6EyA9lQrtc/ QbftdMNWM4Tg8EOyZNgKnTvMDZq5p3ssHk7W7aOTqwyGr0TNrwrEYg01Jc8vkPNWBGQ/ spsbGgAg1NkBG1epHMEeBvR1/GEsW1eW6cb1pt5jql9/B5lZYYYwOQf/oZ9Dfl16udxR fQ7lL8cAbPXMWM5bsgtMMu5VmhCpbMtP6igz9C45WOxw6kuy9HoQt20YawlDmZfW9tyJ 77TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688549741; x=1691141741; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l0XHslbV1muN4VtuaM4zruuvudWXBg6/E8tWHxT1G2w=; b=JVkwM4o1DAs6YWzYHGLunDyqZ6uavsMbq/jSK1Wc2Cbcngmxjg7PeEjcA7IqL4Jy00 qmmOLEA4TmsgMwDo0FMIGVqdxWozUHch5GHxpo47PgpSjMXwIaBLGkUJ2C4KEBrdzncM whJ6tRWaHtUq5RJiBjsykyEBQDvVTuI1pDFkjbfjd/Gkk3ZfOrggSF1dHL5C1aHoAscR W1BwMJiViyxkKecVEgRuVMrc0u8H5jtOw4FqaomHLwU2pOUl2y8mJCsxCL1n9IqdLf16 dx3l/F6G0X9OnCNHJJZ+jB5cntfv0uBTv3uCDvonVMM+fsA5Xg9WHS/II+Mi5bPOL+Kq VeBA== X-Gm-Message-State: ABy/qLYBJMsieuda4tS0qek+MpQlBd5CMye1Y5NynXAr2yzcA5ssTt1k belSFwQ9mgEebs6NZcoNRnkeffra3bBZVuGuJFg= X-Google-Smtp-Source: APBJJlFz3GD2LUh6Zwr7QSCWB/3NRAG6M/UVX+8FWJ/vvSRXnWpckZNZca5gXfWOTtmlF8Ihw5rOuA== X-Received: by 2002:a2e:800b:0:b0:2b6:cd40:21ad with SMTP id j11-20020a2e800b000000b002b6cd4021admr10535462ljg.37.1688549741363; Wed, 05 Jul 2023 02:35:41 -0700 (PDT) From: Jens Wiklander To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand.Marquis@arm.com, Anthony PERARD , Juergen Gross , Wei Liu , Marc Bonnici , Achin Gupta , Jens Wiklander , Volodymyr Babchuk , Bertrand Marquis , Henry Wang Subject: [XEN PATCH v9 22/24] xen/arm: ffa: list current limitations Date: Wed, 5 Jul 2023 11:34:31 +0200 Message-Id: <20230705093433.2514898-23-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230705093433.2514898-1-jens.wiklander@linaro.org> References: <20230705093433.2514898-1-jens.wiklander@linaro.org> MIME-Version: 1.0 Adds comments with a list of unsupported FF-A interfaces and limitations in the implemented FF-A interfaces. Signed-off-by: Jens Wiklander Reviewed-by: Henry Wang --- xen/arch/arm/tee/ffa.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c index 59832f73c2be..0fbaf7e1bb8f 100644 --- a/xen/arch/arm/tee/ffa.c +++ b/xen/arch/arm/tee/ffa.c @@ -13,6 +13,37 @@ * https://developer.arm.com/documentation/den0077/e * TEEC-1.0C: TEE Client API Specification version 1.0c available at * https://globalplatform.org/specs-library/tee-client-api-specification/ + * + * Notes on the the current implementation. + * + * Unsupported FF-A interfaces: + * o FFA_MSG_POLL and FFA_MSG_SEND - deprecated in FF-A-1.1-REL0 + * o FFA_MEM_RETRIEVE_* - Used when sharing memory from an SP to a VM + * o FFA_MEM_DONATE_* and FFA_MEM_LEND_* - Used when tranferring ownership + * or access of a memory region + * o FFA_MSG_SEND2 and FFA_MSG_WAIT - Used for indirect messaging + * o FFA_MSG_YIELD + * o FFA_INTERRUPT - Used to report preemption + * o FFA_RUN + * + * Limitations in the implemented FF-A interfaces: + * o FFA_RXTX_MAP_*: + * - Maps only one 4k page as RX and TX buffers + * - Doesn't support forwarding this call on behalf of an endpoint + * o FFA_MEM_SHARE_*: only supports sharing + * - from a VM to an SP + * - with one borrower + * - with the memory transaction descriptor in the RX/TX buffer + * - normal memory + * - at most 512 kB large memory regions + * - at most 32 shared memory regions per guest + * o FFA_MSG_SEND_DIRECT_REQ: + * - only supported from a VM to an SP + * + * There are some large locked sections with ffa_tx_buffer_lock and + * ffa_rx_buffer_lock. Especially the ffa_tx_buffer_lock spinlock used + * around share_shm() is a very large locked section which can let one VM + * affect another VM. */ #include