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

Re: [PATCH v3] xen/device-tree: add a helper to dump an FDT in DTS-like format


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Thu, 15 Oct 2026 15:11:32 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com 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 (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=dwKOfQRWkzCkLa5s6exp88jnOwqDkCXQ0jfB372DrfI=; b=oyiezjzj7ddCOBQL32bTaRBBRdfJc1uKl05o8u3ARL8f2POVw9p3her1rFgOGZqrnT1TLKBUTmrGAERO0vIh4ae/b/CkHfRfquDE2swr/ZiiiqSjHPn3Ozbp87MEtXCkhs79oY4HNZ26Kq4F0qLeELaawkyWTEaId85z2moIouhqFcBd7QnKULoHTj8uHZBaI2z7tTaEUWQqVahp0TvNzgjrFO918bh9RlV8abT6FdahNux87WuzPbN6Qf6mquDHrIEipdrvMJ5rfmvgJUmh4AxDJj24t8fDE4y/cV5keDoMFkgJfDfvoUIjfa28ES0Mh6sWGmhh/XPsjc3wDJi26A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UNuJ+TJjBgSkVEBxh7raLlwXK7TxpCACzRzWvwxa56OcTpdCUl8Solc1iH+GU8/zNSZQlg7g/Bno/kTtBfWW6Rm/CyyQ07U/pYkyuV+R0QVmH7n1rz7lF1asm4R7veraBv/0Z8nVL7Ha9lz4iFLV3AZVapvHphPt/AM5RT1VlwQXwAERmAthINiRjJwREOHB/591jMHGVqQT5CHqehZDSkkg34a+WzFj63VudXjjBBIlxsY3WMsS4bhROv+X4PFlzTeGIKXHeFJrsed45QfU8iVT++g/UuIYahCiMWopPjlfuQCgKNnEKGQ0ps8GtYJ/7WY405f2loASRVl1nFB6Lw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 15 Oct 2026 13:11:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 15-Oct-26 10:28, Oleksii Kurochko wrote:
> The device tree Xen builds for dom0/hwdom or for a dom0less domain is
> only ever consumed by the guest, so a mistake in it surfaces as an
> obscure failure inside the domain, far away from the code which
> produced the tree.
> 
> Add device_tree_dump(). The output follows dtc's format so that a dump
> can be diffed against the source DTS or fed back to dtc; the value
> formatting heuristics are ported from dtc's utilfdt_print_data() for
> that reason. The walk itself goes through libfdt rather than decoding
> the tag stream by hand as dtc's fdtdump does.
> 
> Dumping a whole tree is only useful while debugging and costs both code
> size and a lot of console output, so it is put under its own option,
> CONFIG_DEVICE_TREE_DUMP. It is separate from CONFIG_DEVICE_TREE_DEBUG
> because the generated tree is often all that is needed, without the rest
> of the device tree debug messages.
> 
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

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