Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3419004lqp; Tue, 26 Mar 2024 08:39:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPZ2irTOZhpklehysHnaHF05LH03akR2r5C664yi4WB0N9W7G16yh10k22NQDWvqJZcK8R/z/v5PsHKJHMoK7r97ZntWf6ucWiutkgLQ== X-Google-Smtp-Source: AGHT+IENQpBXIqbRzIvA7ZZewQg0wn/0VKcVMApBMtjhWWtEYhd56GDxeBPEAgyvw+XzcT+h6gJS X-Received: by 2002:a17:906:f9d8:b0:a47:499b:d735 with SMTP id lj24-20020a170906f9d800b00a47499bd735mr6424943ejb.14.1711467597554; Tue, 26 Mar 2024 08:39:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711467597; cv=pass; d=google.com; s=arc-20160816; b=W4ZWuxAerxwlEGhvtQ1sGzLV3P76+a91EaWT/FkfEqs5wunv/8e2KCC9bfFDnTMOcR MGwuUXc7jMs8DXGtLrfMKPqMHq85VEc4Q7xc6wrAuosxY8qkmB1xPvJmtOKNa0BEuOYq okIHi34ThY5SHupI596HmVFi4VaGNuKQs4AJ2qs9+pL04PKlCIVfA+Be7DKp3U1TtsQI TT+J9vaneT5MvpOYe5g5LejR2l6rYnXGeAuqst+NE1zcBP8NAJ9nf+79FfaZ+dB86aKf /kpas3l13zL68mDpZao0fOKx7Nk7592+899xICOsDLR7v/RY7PN2+JquI568w+Yu89sc rRiw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=us3hJ+Yr5VELYEouxH6pThh6yxALKESXf9V/NlCfJmo=; fh=K4zjisiRlQJHnqFyuat7vVaS8cTiixtRg41sISc7q5Y=; b=Y16CpbYCzWoCtblsZ+rYtgTl41dEvksaJ1yV2SfMZQBt0s0WAaWDSnWr5Ywye7p78N S+Br+rGZRkWkg9AyzK/U5rv/zsM0IxO/gog9A3om7QVElwrKvVGmJTb2/2bVm+JlPh2O 71cmnjHPIBLalVAWPsXaEFyudNIpbTsMVuAn50mO9Z+HinX59Q/taY3t4a6Ii3+s4i85 DhIqWKONqdDAlXWCJhc7OFVZ8h7OBfoyw/QBHujEv71zUNipUHPpJqwPrnqq41mD/2cp 8sJrhC5WW6Pf7M9CoRxWmrRhl0yxlCvtzxaeneaEtXprLv/dVo3qHAiuVxgHYBdSSC6+ Acfw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-119346-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119346-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d19-20020a170906c21300b00a4659bf5922si3499079ejz.208.2024.03.26.08.39.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 08:39:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119346-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-119346-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119346-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 49E511F67C97 for ; Tue, 26 Mar 2024 15:39:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62D9F13C8FC; Tue, 26 Mar 2024 15:35:38 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B705513C8E3 for ; Tue, 26 Mar 2024 15:35:35 +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=1711467337; cv=none; b=caFcjmjIxpKhZ00v+9T25tGS+c4/vGSu0z3Aq8ISdg3RDv9kR358yN2okEBr7B85Wugr2gajb6fliDRVVLkWF4bvR7GFpJA/FIo8xVl3HZqpDJVGu0GHWDHi2BuFp6qQFxme8iU0ZhLyYFPmHPg03hyY8KPSvNZRMiLNiG9egyc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711467337; c=relaxed/simple; bh=Kyhb5q3lU4UhpGJ7tYd+4i5cDP17k8NZvE0FhPQYUCE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZRNysy72SAsF6RfVTHbVPEAaWMHtcg1oD3PUSnlnt7l9ZTQf00jHA+XsDYxP0IYPg08yQ14xD+um3+fYX7VNDV7hwUC5sKaIv9y5jQ6/2o1g3ztNACvVyOD0aNr54oTn5YWPUT41KrJnt50o5/xafNw9+ofCLrxCOqF8Z9vmxUw= 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 86D252F4; Tue, 26 Mar 2024 08:36:08 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CFC993F694; Tue, 26 Mar 2024 08:35:33 -0700 (PDT) Date: Tue, 26 Mar 2024 15:35:31 +0000 From: Sudeep Holla To: Jens Wiklander Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Marc Bonnici , Sudeep Holla , Olivier Deprez , Lorenzo Pieralisi , Bertrand Marquis Subject: Re: [PATCH v2] firmware: arm_ffa: support running as a guest in a vm Message-ID: References: <20240325081335.2326979-1-jens.wiklander@linaro.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240325081335.2326979-1-jens.wiklander@linaro.org> On Mon, Mar 25, 2024 at 09:13:35AM +0100, Jens Wiklander wrote: > Add support for running the driver in a guest to a hypervisor. The main > difference is introducing notification pending interrupt and that > FFA_NOTIFICATION_BITMAP_CREATE doesn't need to be called. > > The guest may need to use a notification pending interrupt instead of or > in addition to the schedule receiver interrupt. The above statement makes me worry a bit that we are still not on the same page about NPI vs SRI. NPI need not exist in addition to SRI. And in v1 you did mention you have SRI in the guest as well. Then why do we need NPI in addition to that. As part of SRI, the callback ffa_self_notif_handle gets registered and will be called as part of SRI handling. What you do in notif_pend_irq_handler(), exactly what ffa_self_notif_handle() already does. I am still struggling to understand the usecase here. If you just have NPI and no SRI when running the driver in the VM, then it aligns with my understanding of possible use-case(not the one you mentioned in v1: where FF-A driver in VM will have SRI as OPTEE is the secondary scheduler) If we are supporting NPI or SRI, I think we can see if we can further simplify this change, but I want to get to an agreement with usage model before we dig into implementation details in this patch. -- Regards, Sudeep