From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DB23C433EF for ; Fri, 8 Oct 2021 19:23:25 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id CED2E60FF2 for ; Fri, 8 Oct 2021 19:23:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CED2E60FF2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=forissier.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=mkYaRYpLbgKsjkD0ywVoTls551Kr7+oUKf6xz0Nuh+Q=; b=u6l19FHmFqhIhkrTl1yz3DbJAa 6P9S1sMpZ8w8IvMUBvmTANCa84FtzCS3BlOHs1W1Eus0cK+Wo8remn+P3ZLoL4KchioYN0yeumOmG lyTks6dPEyfKcoNo5rUP509TQ1GOThMKRBKg2JE/Q+Y4hdeAFqtvCxzQ3IBdF69uIIUSUgzmAjpvS d1F56tr6caaRbF1iqt67b4Ut4e9gMBeI8G6gjdxGRhvEK7kW6hx9UtirsFGm+OodDo6QXZxmS0cpV 8ChkKLvPtsHyL55QPH+7FeJtthsNTK/fOO2gX3PU06NIUHsI4jLr/i1MytoGobqOI4Q3vyYFffXvG iJ/dgOKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYvRK-003xSI-Fe; Fri, 08 Oct 2021 19:21:54 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYvRG-003xRS-L3 for linux-arm-kernel@lists.infradead.org; Fri, 08 Oct 2021 19:21:52 +0000 Received: by mail-wr1-x430.google.com with SMTP id k7so32606182wrd.13 for ; Fri, 08 Oct 2021 12:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=forissier-org.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=G5MXHL3RVxoVQVhCir7zA7PPA7xLL8Bs78TVa7I6ECg=; b=3M5DM7GuLTq65/4rdqUXQ4Mh553R+gh6NCcOajc6PSseSXXMJWxm525x+HzaqcKE1E Mhn1NDvRdMo1HfA2+KqUR8c1wA255/GB24+Ybhl5hl1naHUghSOSyMZ2qAKneaffPS5s xjOKhwiy594mA+UUx4fcihp7S26Pi57NnOTd/qnRTzvvHdcxlrw5CvyikpAYYqrwjp2L 55gnkm6QY3wLagWqwnEMP4VQHsNRFV+6CWC8dyPi+UM4iYF+PS3GX8g1gol6Zy/MxKnu 1QYj/nFlGrO9YmFVDYrwK/JvTEzwPz3J1drUOgX5dl+87Z/wNLspxiBBba+6yLBeolU1 hWGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=G5MXHL3RVxoVQVhCir7zA7PPA7xLL8Bs78TVa7I6ECg=; b=ms9yJ0MyCyarYAenMP2xiSyi/PqEaLSxinnwKefblJw4t5BoxVQPJrp380v+Se8TMJ JkW6JAi7iNqhiygn3pBTYDa29M/pQqY7AkFnwOgq0XbT0ifmVmNWXkBYwKbD7+2Zyr/2 TL7m6Ifgl9fUh+Pe3DauTNVDkFxvvOOWBx496Mlf7/9nvOiNwaYbAuJ3RrQIEPzMovvJ Zi+DzVm6I/sB2j5rVqZhSCfnq1GK1SLoqb8t1M9OqDxyUwZP4PANS7kX3keKMXS0C+TQ OH5IwrncN0z0zp/oZGH7UofjsWP5sNXkcwBUAV511tydAmQIC/5T84ndESDtLDdBHa7+ gBVw== X-Gm-Message-State: AOAM533ZVVTYt/Yn9fwjnh5E8XCroepms5w28OnNskhkP1R3SiHApnO9 25piNEWATte5F3zYsV2OTTtDg6RIcxFrYKFzYbGM2r3r X-Google-Smtp-Source: ABdhPJxOKpj9j2pUB9abtT1MZchONytdzTG/Nhp80ROIe6hQEcFYAMkHzH1akLXMPukqOvui/KzjZQ== X-Received: by 2002:a05:600c:3504:: with SMTP id h4mr1122400wmq.123.1633720908418; Fri, 08 Oct 2021 12:21:48 -0700 (PDT) Received: from ?IPv6:2a01:e0a:3cb:7bb0:2004:21db:309b:6f18? ([2a01:e0a:3cb:7bb0:2004:21db:309b:6f18]) by smtp.gmail.com with ESMTPSA id o6sm292622wri.49.2021.10.08.12.21.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Oct 2021 12:21:48 -0700 (PDT) Subject: Re: [PATCH v6 5/5] optee: add FF-A support To: Sudeep Holla , Jens Wiklander Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org, Sumit Garg , Marc Bonnici , sughosh.ganu@linaro.org References: <20211006070902.2531311-1-jens.wiklander@linaro.org> <20211006070902.2531311-6-jens.wiklander@linaro.org> <20211008132732.hbmkd3hftdydtrsc@bogus> <20211008163200.wgls7gijpsk556kl@bogus> From: Jerome Forissier Message-ID: <94277064-eff7-cd63-b5cb-d6b53e408e81@forissier.org> Date: Fri, 8 Oct 2021 21:21:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211008163200.wgls7gijpsk556kl@bogus> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211008_122150_794592_1A94BFB1 X-CRM114-Status: GOOD ( 21.90 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Sudeep, On 10/8/21 6:32 PM, Sudeep Holla wrote: > On Fri, Oct 08, 2021 at 02:27:32PM +0100, Sudeep Holla wrote: >> On Wed, Oct 06, 2021 at 09:09:02AM +0200, Jens Wiklander wrote: >>> Adds support for using FF-A [1] as transport to the OP-TEE driver. >>> >>> Introduces struct optee_msg_param_fmem which carries all information >>> needed when OP-TEE is calling FFA_MEM_RETRIEVE_REQ to get the shared >>> memory reference mapped by the hypervisor in S-EL2. Register usage is >>> also updated to include the information needed. >>> >>> The FF-A part of this driver is enabled if CONFIG_ARM_FFA_TRANSPORT is >>> enabled. >>> >> >> I am not sure if I missed this with earlier version but I see the below >> warning the second time I insert the optee module. I am sure I tested it >> with previous version when I was fixing issues with FF-A as a module. >> >> Not sure if I am missing something in my steps. >> > > OK, more info, indeed I didn't observe this issue 2 weeks back with optee > at commit 57e642f12085 ("core: enable system PTA upon user TA support"). > The UUID(d96a5b40-c3e5-21e3-8794-1002a5d5c61b) wasn't enumerated with above > commit. Today I am testing the latest commit 2de2880065f3 ("core: update > reference link to PrimeCell Cache Controller"). > > Though it looks like an issue with the driver, the latest optee changes > triggered the driver to hit this issue in my setup. Hope this helps. Totally makes sense. The optee_os commit triggering this is almost certainly 811c42d40cd0 ("plat-vexpress: enable CFG_ENABLE_EMBEDDED_TESTS by default"). With this commit, the "invoke tests" PTA gets included by default in the TEE binary. This PTA has the TA_FLAG_DEVICE_ENUM flag so it is enumerated by the Linux driver. AFAICT the vexpress platform has no other PTA with that flag, so as you said the OP-TEE commit is simply exposing a bug in the Linux driver. > IIUC we are not undoing optee_register_device executed via > optee_enumerate_devices in the exit path. That doesn't sound good indeed ;) -- Jerome _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel