From patchwork Thu Apr 11 12:57:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 13625942 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 9FD69CD128A for ; Thu, 11 Apr 2024 12:58:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=P0lfxmYiDtLwV2YrvZ3B/X/HVlc9J0rbi0TS40WLbSU=; b=qerwuVo6aJX+zi 9gEqD7vTFKpqCicAn8MJmJDZxdNmkF7Iy5aV+jSDPQhXHhP5eJS3K4WY2jZZERaU5iqWe7yR3Vpfg ydreO9hlBm+tWzs2bFTEGRRVOTncN9dUMbSsHfBT7Tiuxn8ra5FVW/Zn37ryKHOTm16MMZYIYUPp+ mUVjdihxOPO7fupgtTrdoOGVkOJx2bn7tOT1XNghVNXVtcDcLU7FmGeC3mMhKthWI/Ex6VipDofdt KO9CR76Ea7d6y+Og/mx3l0wj8IYZKImzdqWr1jwKAyEQ9zYmJTB5E+x8SVE+TVTl8hQov9tgq7aNX nMq+so3p2HA7Ncs/LPdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruu01-0000000C2gM-2chd; Thu, 11 Apr 2024 12:57:53 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rutzx-0000000C2e9-0bd9 for linux-arm-kernel@lists.infradead.org; Thu, 11 Apr 2024 12:57:50 +0000 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 C2542113E; Thu, 11 Apr 2024 05:58:14 -0700 (PDT) Received: from e103737-lin.cambridge.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 61F2E3F64C; Thu, 11 Apr 2024 05:57:44 -0700 (PDT) From: Sudeep Holla Subject: [PATCH v2 0/3] firmware: arm_ffa: Add support to run inside a guest/VM under a hypervisor Date: Thu, 11 Apr 2024 13:57:31 +0100 Message-Id: <20240411-ffa_npi_support-v2-0-927a670254e6@arm.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAD3eF2YC/3WNywrCMBQFf6XctZHkNimtK/9DpMQ8bBZtQlKDU vrvpt0oiMs5MHMWSCY6k+BULRBNdsn5qQAeKlCDnO6GOF0YkCKnnFFireyn4Pr0CMHHmXSt0VY rxdsWoVghGuuee/FyLTy4NPv42g8y29b/rcwIJUwKxLru2E2zs4zjUfkRtlLGb5v92lhsaoRqp GgaLfjHXtf1DZurqqvqAAAA To: linux-arm-kernel@lists.infradead.org Cc: Marc Bonnici , Olivier Deprez , Lorenzo Pieralisi , Bertrand Marquis , Jens Wiklander , Sudeep Holla X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1643; i=sudeep.holla@arm.com; h=from:subject:message-id; bh=yvsz6FIEgh28JuGziFFYFo19F2X8PZf9ntgzgcQYkhs=; b=owEBbQKS/ZANAwAIAQBBurwxfuKYAcsmYgBmF95HkHH9X+JKUugOaX31s8IXgYz5U4YvLYffu d6Jk6lawl+JAjMEAAEIAB0WIQS6ceUSBvMeskPdk+EAQbq8MX7imAUCZhfeRwAKCRAAQbq8MX7i mFLQEACCM85y540PViW4djFWJCBPdPVK7iqEgb3/nf7rmtg599/58UfNCwn/SNq9DQSHG7SRGc4 Mqy+AZJ22YgiRWQ9l5tUEGKqWgGy8i2yERT5ucYeimF49xDGl28clOW8TBBYFaJau5SPRIfUAEw OPHx4x08Mxs7LJ58BDNNPFCeJgKHS86jQxtQ7VBPxLRp4uUvSpq4cszhputbyxvFnuI46UPN6Hp a8bBTPF9uCjLTL7j2skI+VXME1QW1GBMPnrQz8HeRjx8P5rFxkzUR44hfx/hix30C+JbntNeOH4 P5qHw6+LAD/BLVLWhuFuY2p9Azr2PFJ7mf/9YZUZAzisqPPOfaLGYh9Hc/WnHib9JelZy9VGXZO KGce2QgJQFTOcuciDH17cgQyyJJSb77SP9ASijrzYDV+gFBvf+h6a3aOFVJY8s3Ew3b4IKFO0ig au4XC80tvVxyG5OR2aqlhIJFNr2FSI3jk542dbVBvwpI8Rve7YezgE/ZSzNAjpzKZY+F1cmR6lF 93q7uV6IMIAjjQVD5IN7TUguI2sH3uk+xqvwg67L0yEV34PTbgbYNTvnRmHc07WJla9YOs1suOU A226ZMNj8Pft2sOE0CP7i+nSbw6iYqo2C7b5Zj7lxtDhfK/MyUDRsqnGmuyO5/8zwRSgiXgi5Hr ewtIHXXU/5PGW4A== X-Developer-Key: i=sudeep.holla@arm.com; a=openpgp; fpr=7360A21742ADF5A11767C1C139CFD4755FE2D5B4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240411_055749_301829_5807BF3A X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for running the driver inside a guest/VM under a hypervisor. The main difference include: 1. supporting introducing notification pending interrupt and 2. Avoiding creation of all the notification bitmaps as they must be created by the hypervisor before the VM is initialised The guest may need to use a notification pending interrupt instead of or in addition to the schedule receiver interrupt. Signed-off-by: Sudeep Holla Tested-by: Jens Wiklander --- Hi Jens, This is almost identical to you single patch now. Just split into 3 patches with refactoring kept separate. Can you please check if this continues to work on your setup(unlikely to break anything). Once you confirm, I am happy to queue it. Regards, Sudeep Changes in v2: - Dropped the idea of SRI or NPI support - Added back both SRI and NPI to co-exist as in the original patch from Jens https://lore.kernel.org/all/20240325081335.2326979-1-jens.wiklander@linaro.org/ - Link to v1: https://lore.kernel.org/r/20240410-ffa_npi_support-v1-0-1a5223391bd1@arm.com --- Jens Wiklander (2): firmware: arm_ffa: Skip creation of the notification bitmaps firmware: arm_ffa: Add support for handling notification pending interrupt(NPI) Sudeep Holla (1): firmware: arm_ffa: Refactor SRI handling in prepartion to add NPI support drivers/firmware/arm_ffa/driver.c | 128 ++++++++++++++++++++++++++------------ 1 file changed, 87 insertions(+), 41 deletions(-) --- base-commit: 2c71fdf02a95b3dd425b42f28fd47fb2b1d22702 change-id: 20240410-ffa_npi_support-98edfdcc4882 Best regards,