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 DA408EE57DF for ; Mon, 11 Sep 2023 14:48:38 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.599523.934975 (Exim 4.92) (envelope-from ) id 1qfiDD-0005HE-Ig; Mon, 11 Sep 2023 14:48:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 599523.934975; Mon, 11 Sep 2023 14:48:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qfiDD-0005H7-FS; Mon, 11 Sep 2023 14:48:27 +0000 Received: by outflank-mailman (input) for mailman id 599523; Mon, 11 Sep 2023 14:48:25 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qfiDB-0005Fp-PS for xen-devel@lists.xenproject.org; Mon, 11 Sep 2023 14:48:25 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qfiDB-0001BE-G4; Mon, 11 Sep 2023 14:48:25 +0000 Received: from gw1.octic.net ([88.97.20.152] helo=[10.0.1.240]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qfiDB-0001Bs-B2; Mon, 11 Sep 2023 14:48:25 +0000 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=CSbViKDu4HaFSAdWUxFex4CcIa31b/J+kRzCQER+1do=; b=7KVq4dxiU7/Rs7/DZ+SOcBRh3R LWNhobilXZEC81KWZbyb/zPbg3lVanj0tgQ9QdJH9ZjpkyQb3Gj6bMa1UXTUPtOZ5odfTpBQeBOL1 BONPc5qUcuA3rgziAe2WH64in6/CYAr5es7pe7hPVpzPah6pD6twl4dVrhbC7Nocc22M=; Message-ID: Date: Mon, 11 Sep 2023 15:48:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] xen/arm: Skip Xen specific nodes/properties from hwdom /chosen node Content-Language: en-GB To: Michal Orzel , xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Bertrand Marquis , Volodymyr Babchuk References: <20230911123401.27659-1-michal.orzel@amd.com> <366e89e3-bc3d-4c54-b1ad-8147abbabdc7@xen.org> <042fae56-e8e2-c079-2686-d27c5469b7fc@amd.com> From: Julien Grall In-Reply-To: <042fae56-e8e2-c079-2686-d27c5469b7fc@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/09/2023 15:01, Michal Orzel wrote: > Hi Julien, > > On 11/09/2023 15:14, Julien Grall wrote: >> >> >> Hi, >> >> On 11/09/2023 13:34, Michal Orzel wrote: >>> Host device tree nodes under /chosen with compatible string >>> "xen,evtchn-v1", "xen,domain-shared-memory-v1" are Xen specific and not >>> meant to be exposed to hardware domain. >> >> So, how dom0 is meant to discover the static event channel, shared >> memory it can use? > > For static shared memory: > A node with this compatible is only meant for Xen since it contains information like host-guest mapping. > Xen creates a different node for guests under /reserved-memory. > Linux binding: > https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/reserved-memory/xen,shared-memory.txt > Xen node generation: > https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/arm/domain_build.c;hb=HEAD#l1407 Ah good point. I agree with this one. > > For static event channels: > This is a bit weird so let me put it in a different way. > 1) Xen does not create any node for static evtchn for domU. > 2) The booting.txt states: > There is no need to describe the static event channel info in the domU device > tree. Static event channels are only useful in fully static configurations, > and in those configurations, the domU device tree dynamically generated by Xen > is not needed. > 3) The "xen,evtchn" property specifies the local port as well as phandle of domU node. > dom0 does not have access to domU nodes, therefore exposing a property with not existing phandle > makes me think that: You have a point for the phandle. Yet, this is the only way dom0 can find the event channel today. As we exposed it, I don't think we can remove it until we have a proper replacement. We might get away if the feature is not supported it at all. But there is no statement, so it is a little unclear whether the feature is meant to be in technical preview. In any case, I think the commit message deserve a bit more explanation as hiding "xen,evtchn-v1"/"xen,domain-shared-memory-v1" is not uncontroversial. > a) point 2) applies to dom0 as well and we should hide this node or > b) there is a missing property for both dom0 and domUs to tell them about static local port in a proper way > > Exposing Xen specific evtchn node only to dom0 and not to domU with required information happen to be found as first value > in xen,evtchn is definitely not a proper solution. My concern here is we exposed such information to dom0. So as I said above, I don't think we can simply remove it as there is no other way to find such information today. It doesn't matter that it wasn't exposed to domU. > Also, there is no Linux binding for it. AFAIK the static event channel support was not added in Linux until very recently. Also, I think the kernel doesn't directly use the static event channel. So it is possible, this is just an overlook. Cheers, -- Julien Grall