[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/arm: Skip Xen specific nodes/properties from hwdom /chosen node


  • To: Julien Grall <julien@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Mon, 11 Sep 2023 16:01:04 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kjGYVLcBdnVTAOB4ZKotPMviIqusi914qXiDXN+m48Y=; b=KzWmMQFo/mGnS0qkWPIGLHbVQREIE3kJiZ6Ai1r7AuhUVlAknUsjvOcY7dJcDKttp4rH0/fMI1MnsGlYGhyEb2sKMZ/eMK9p/RJ52svCJhhgvMv2tzdUjQu0izw5yp8QhRKL9tdFgGJaIl5y87X7VjjjgoIbxda8dCjb7kK9EWhJl14DzraqvaniDEz5MrxsjliYEe8ZeXZ1GO4WiOq5bP0oBTBkvYO6OMp6bjmkTfb+cUCbAxW+gXtIN2tl/6bgDR8pZmwTaa/BmTGYeBDknPFityqUyy79j0ZVIP76QuvPDJBO3eek5UWU7ieeOoXZ3xEoponMxLJDP9a+/hxEOg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kw36Ht/KL7ayI2K1z6lh7SHEwnWi5qnOucBxnn6QcApxFvBdZRyM7R8Z0NGfvwdqbQk9Lld4f99ZgMdQ3inq4fOrRLuEFGcm0OugyA1cropFGaKss0awcjOQiHy+AgQouZD/I0/zX4m2LUrrs7kUz90K7Us6WOkbvtmRSvXfOxr3PUE4HTsPqngjgpBib1e7uyCo6qRdZHV9f4qto0eK/xbx8R62gIsLlnTr4bRYmFoAyomdUy7fFP5LkK3+uf5L4QnypSGbNsYifAV0FV7VaPcVgeW5nT4/txGpXFYGs+t/DE/82/C5+fSQCl3Lw0vCBX5Pz/OhSboeGbP8Voyh3A==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 11 Sep 2023 14:01:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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

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:
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. Also, there is no Linux 
binding for it.
All that makes me think that the author's idea was not to expose it.

~Michal



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.