X-Received: by 2002:a17:90a:d90b:b0:1bc:4ec7:d867 with SMTP id c11-20020a17090ad90b00b001bc4ec7d867mr12293659pjv.226.1645671133160; Wed, 23 Feb 2022 18:52:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645671133; cv=none; d=google.com; s=arc-20160816; b=EN2TEcbdhgLcAfCuRk1pPfZqij++CRnQIfvHK7Nv4j1Y2Md/hIEiRtnoqAkgT6w0ut d6lY29mhQk/ui5en0XiIxFIV7IGGnuAxBExL9fEgUCuId57cvtYt0KK0fTyB0yeWK4JM parh2jU3VvRrNISl7gWeb5hWpno0y5fKD/DQ80/oxea86ud94QhgDvRgxZZWiOOwwiXu kpII1YGpjt40HqNnEvwp/4A7ABV+TWjY7DbCArNIP6nAB0NWB2RHH7p0lIgxFr0X5u3B MJHutz32cdUjz1a0j/lSalQDa5em7Gth3H5ZStNcR4ClLs6FBOiSt4IeFY1AKRcjY1GK wxjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=oTT9o5ZnjqUwFW5PjOsT3HGOGoRZ6XEyVA971L2FI8c=; b=N5R1/EZFEl0oOhd8dyAr3QbwEzUbQZ+itXQHF8RvOhDkDDnao15/eS6FVQ50yv5vhC LJIantRazNFuzOx0vLhBPKgCR4CXLPBMm5MwnBxLjLxnY5wmhUMUMq8Dnc/RUf4rF7FN rUjK4c+/uiytunE+e9BhN7gjSC9g5NvUWkU886Tinlun71MiIY25okewsDlzhBAeyG/X ad60hn1HR76PAhzWJJ9lluBwwS3fsSpmPGCxc8kTdoVeMuc9I5R+OVr+wMOS3J3jGuKo wmww18F/+TvTQ++Fy1RHLcTeujRxI3JBmgFF5mwDRa3b20YvVQxDLPyyNPLxpjqDO18n TGKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I0zONkTT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p9si1300320pgc.871.2022.02.23.18.52.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 18:52:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I0zONkTT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C2A18654B1; Wed, 23 Feb 2022 18:52:07 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230183AbiBXCwe (ORCPT + 99 others); Wed, 23 Feb 2022 21:52:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230113AbiBXCwe (ORCPT ); Wed, 23 Feb 2022 21:52:34 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23EBA5D660; Wed, 23 Feb 2022 18:52:03 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2426BB8235B; Thu, 24 Feb 2022 02:52:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 630ABC340E7; Thu, 24 Feb 2022 02:52:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645671120; bh=Tpvuc+aJ6zdLOz71U495XtcwBfHi0Y1vaThGZ0si/lU=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=I0zONkTT0WroA/A2c1xEiTkUKJoMY2D7EXHPxkH4BUCjoFIqsaD4VjLBe39sBTize /GcfM36Mu3ZigNjHAThKY9L0w3dC53pWRYkCrtuwTOS6mi3zkmIsAdIN7Qqwdnay7b NxBKyOMj73eQPOBEPK4q1HkTzhOFB/gVPm8eVxU1Bm+LVWG4tUW7NMlcQ+Y2YbVZei ByeqlBgkd7X6/t6GpUxUbSL/zvQJc7N2fOn2S3/9I5xvMbUUKWQbKJbPp+a6Q/6xYL zaF9Ae29mf02NvV5eYC+kodbPb7te+7/qSgqt94ImBWqtuvcYwtsKnStFqV5yLM7tg PUOHLaSjYBGiQ== Date: Wed, 23 Feb 2022 18:51:59 -0800 (PST) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: Oleksii Moisieiev cc: Sudeep Holla , Krzysztof Kozlowski , "robh+dt@kernel.org" , "devicetree@vger.kernel.org" , Cristian Marussi , Stefano Stabellini , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH 0/1] dt-bindings: arm: Add scmi_devid paramter for In-Reply-To: <20220222173458.GA2310133@EPUAKYIW015D> Message-ID: References: <2546477f-4190-e838-3095-f47b31802445@kernel.org> <20220221213932.GA164964@EPUAKYIW015D> <7f17ab8f-429f-d2e0-8f5f-bfa2dd19cc49@kernel.org> <20220222161440.xadrgjftdyxenxgo@bogus> <20220222173458.GA2310133@EPUAKYIW015D> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Feb 2022, Oleksii Moisieiev wrote: > On Tue, Feb 22, 2022 at 04:14:40PM +0000, Sudeep Holla wrote: > > On Tue, Feb 22, 2022 at 09:06:25AM +0100, Krzysztof Kozlowski wrote: > > > On 21/02/2022 22:39, Oleksii Moisieiev wrote: > > > > Hi Krzysztof, > > > > > > > > On Mon, Feb 21, 2022 at 10:01:43PM +0100, Krzysztof Kozlowski wrote: > > > >> On 21/02/2022 18:26, Oleksii Moisieiev wrote: > > > >>> Introducing new parameter called scmi_devid to the device-tree bindings. > > > >>> This parameter should be set for the device nodes, which has > > > >>> clocks/power-domains/resets working through SCMI. > > > >>> Given parameter should set the device_id, needed to set device > > > >>> permissions in the Firmware. This feature will be extremely useful for > > > >>> the virtualized systems, which has more that one Guests running on the > > > >>> system at the same time or for the syestems, which require several > > > >>> agents with different permissions. Trusted agent will use scmi_devid to > > > >>> set the Device permissions for the Firmware (See Section 4.2.2.10 [0] > > > >>> for details). > > > >>> Agents concept is described in Section 4.2.1 [0]. > > > >>> > > > >>> scmi_devid in Device-tree node example: > > > >>> usb@e6590000 > > > >>> { > > > >>> scmi_devid = <19>; > > > >>> clocks = <&scmi_clock 3>, <&scmi_clock 2>; > > > >>> resets = <&scmi_reset 10>, <&scmi_reset 9>; > > > >>> power-domains = <&scmi_power 0>; > > > >>> }; > > > >> > > > >> And how do you prevent DT overlay adding such devid to any other node > > > >> thus allowing any other device to send requests with given devid? > > > >> > > > > Thank you for the quick response. > > > > scmi_devid value will be used only by Trusted Agent when the device > > > > permissions are set. Non-trusted agents, which in our case are > > > > represented as Guest OS are using scmi drivers, already present in linux > > > > kernel, ignores scmi_devid and uses scmi_clocks, scmi_power, scmi_reset > > > > nodes to access to SCMI protocol. > > > > > > Ah, ok. > > > > > > > > > > >> Plus few technicalities: > > > >> 1. Hyphen, not underscore in property name, so scmi-devid. > > > > > > > > Thanks for the tip, I will change that in v2. > > > > > > Few more thoughts: > > > 1. This looks specific to ARM SCMI, so you also need vendor prefix, so > > > something like: > > > arm,scmi-devid > > > arm,scmi-device-id > > > > > > > Keeping the other discussion separate, I wanted to comment on this. > > I agree with Krzysztof on having vendor specific prefix if we decide to add > > this device id thing. However, I prefer not to use "arm,scmi-" here. > > It can be "xen,scmi-" as we had plans to introduce some concepts in SCMI > > spec that may use looks like this device-id. I would just like to avoid > > conflicting with that in the future. It may happen to be same in the future > > (i.e. this xen device-id matches 100% with definition of device-id we might > > introduce in the spec, but I want to make assumption otherwise and leave > > scope for divergence however small/little it can be). No issues even if > > they converge and match 100% later in the far future. > > > > xem,scmi- works for me. What do other thinks? ^ xen,scmi- If this problem was Xen specific, then it would be fine to use xen,scmi- As Xen developer, it solves my problem and I am fine with it. However, from a device tree and SCMI point of view, it looks like this problem is generic and it just happens that Xen is the first implementation to encounter it. Cristian wrote: "The SCMI spec does not indeed cover the discovery of such devices and the related associated resources: it indeed delegates such description to FDT/ACPI as of now." How is that supposed to happen today with the current DT definitions, regardless of Xen? Is it a gap in the current device tree binding?