Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6759321rdb; Tue, 2 Jan 2024 12:19:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxzBZaHOfZzHHAy4h8nwJOIfzry17qg7vWE3zi2eC3fFzegkxMERo8ObQrn2WpKm9aBzGq X-Received: by 2002:a05:6a20:4d02:b0:18f:97c:978e with SMTP id gb2-20020a056a204d0200b0018f097c978emr16327263pzb.118.1704226744099; Tue, 02 Jan 2024 12:19:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704226744; cv=none; d=google.com; s=arc-20160816; b=H3YxT3DtMSG6QzSMeE7TQCSt7u62+wJCSJeMIeOdQsLuYhXZcdx/GdEeYdj/pJOfW5 ON02XZckUXSPvMLcME0Xl8yd9jtlHkRHmHL5EaA519bbUsjqBLqsDUNqc9INeM3ffwXz k+liP0QqxBPyDU+TanCmW7b0KY8jG9kkUabquw19Ib2CYPzT0r9rXKA3Vdv4I1WU6qbe Y0D9A9WtR1ZOxTqOuwHreuA60KkPw08z4dIYdmj7y9aec2mcPB86MCxIHIaBvstaF7nt S2Mn/II+ggs9BVjSxC8MdsLlx9VAInscz2WQU7iIFCHx3mdr54qCoZrEduhDtxSJiSEA Q+dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:subject:cc:to:from :date:dkim-signature:dkim-filter:message-id; bh=JFUj3C7F4v1llVh0SHjV/UZr4Y8Q5mWVzW88656cZ4c=; fh=AS3R6UXbIyAF6jzq/MgRt2kJwpRsAl3CIwnHJsqk2U8=; b=TG7cQh5y0NcLPhOFJddShO8WZghvK3cQm7RZoOxoG5aHWTX8b5HZ4ktVIvIJELuJDw IGymypkTCOPqWKqTx6upr9MfthHq1MJJDgnrkglUnOoe4PtRRpxSpjlEYRLdp7sTRf96 +Ooc2Aq0vbPbIbe+1EiH89VncCIQo/jSHaK2OTl64dSx3I7VmxMhTwhguL9aO8dKcAiq YkuF/BRBRElvUcgPD6WcB/4L8KOfuO+uda8WFhzwnjGvoaG5lnSxzGLlEyX9DD+P6nRP efIiJOl4W8Sey4A1x9vCyH/9TxejYIbND23PRNGXJIXT8HUQmQXTNeD2l6a87ZJchNW7 mwog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=jBZq+QIm; spf=pass (google.com: domain of linux-kernel+bounces-14798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a192-20020a6390c9000000b005bdfda8e044si17065398pge.775.2024.01.02.12.19.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 12:19:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=jBZq+QIm; spf=pass (google.com: domain of linux-kernel+bounces-14798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Message-ID: <65946fb8.630a0220.10740.6aa5SMTPIN_ADDED_BROKEN@mx.google.com> X-Google-Original-Message-ID: <20240101035518.GA804@skinsburskii.> Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BE213B2233E for ; Tue, 2 Jan 2024 20:18:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5EF911641B; Tue, 2 Jan 2024 20:18:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="jBZq+QIm" X-Original-To: linux-kernel@vger.kernel.org Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EF7416408; Tue, 2 Jan 2024 20:18:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: from skinsburskii. (c-73-239-240-195.hsd1.wa.comcast.net [73.239.240.195]) by linux.microsoft.com (Postfix) with ESMTPSA id 8634120B3CC1; Tue, 2 Jan 2024 12:18:47 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8634120B3CC1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1704226728; bh=JFUj3C7F4v1llVh0SHjV/UZr4Y8Q5mWVzW88656cZ4c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jBZq+QImwExtqzfSMUaFBx5SqLCBQZlhbdMiNYB9OQZDuVtBKnZllTeupWgAKu58t 4yOsU39+h82ZiQ2rxDh7b264mytw7f1GFBNGYW+/MioPPM90R/n2xElpJXMoDcvHCU nesWzuBT96S1hmpCoXyzFXlJiuFt3xFbHxdqt+iM= Date: Sun, 31 Dec 2023 19:55:18 -0800 From: Stanislav Kinsburskii To: Alexander Graf Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kexec@lists.infradead.org, linux-doc@vger.kernel.org, x86@kernel.org, Eric Biederman , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Rob Herring , Steven Rostedt , Andrew Morton , Mark Rutland , Tom Lendacky , Ashish Kalra , James Gowans , arnd@arndb.de, pbonzini@redhat.com, madvenka@linux.microsoft.com, Anthony Yznaga , Usama Arif , David Woodhouse , Benjamin Herrenschmidt Subject: Re: [PATCH v2 07/17] kexec: Add documentation for KHO References: <20231222193607.15474-1-graf@amazon.com> <20231222193607.15474-8-graf@amazon.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231222193607.15474-8-graf@amazon.com> On Fri, Dec 22, 2023 at 07:35:57PM +0000, Alexander Graf wrote: > diff --git a/Documentation/kho/concepts.rst b/Documentation/kho/concepts.rst > new file mode 100644 > index 000000000000..8e4fe8c57865 > --- /dev/null > +++ b/Documentation/kho/concepts.rst > @@ -0,0 +1,88 @@ > +.. SPDX-License-Identifier: GPL-2.0-or-later > + > +======================= > +Kexec Handover Concepts > +======================= > + > +Kexec HandOver (KHO) is a mechanism that allows Linux to preserve state - > +arbitrary properties as well as memory locations - across kexec. > + > +It introduces multiple concepts: > + > +KHO Device Tree > +--------------- > + > +Every KHO kexec carries a KHO specific flattened device tree blob that > +describes the state of the system. Device drivers can register to KHO to > +serialize their state before kexec. After KHO, device drivers can read > +the device tree and extract previous state. > + > +KHO only uses the fdt container format and libfdt library, but does not > +adhere to the same property semantics that normal device trees do: Properties > +are passed in native endianness and standardized properties like ``regs`` and > +``ranges`` do not exist, hence there are no ``#...-cells`` properties. > + > +KHO introduces a new concept to its device tree: ``mem`` properties. A > +``mem`` property can inside any subnode in the device tree. When present, Should it be "property can be" ? ... > diff --git a/Documentation/kho/usage.rst b/Documentation/kho/usage.rst > new file mode 100644 > index 000000000000..5efa2a58f9c3 > --- /dev/null > +++ b/Documentation/kho/usage.rst > @@ -0,0 +1,57 @@ > +.. SPDX-License-Identifier: GPL-2.0-or-later > + > +==================== > +Kexec Handover Usage > +==================== > + > +Kexec HandOver (KHO) is a mechanism that allows Linux to preserve state - > +arbitrary properties as well as memory locations - across kexec. > + > +This document expects that you are familiar with the base KHO > +:ref:`Documentation/kho/concepts.rst `. If you have not read > +them yet, please do so now. > + > +Prerequisites > +------------- > + > +KHO is available when the ``CONFIG_KEXEC_KHO`` config option is set to y > +at compile team. Every KHO producer has its own config option that you Should it be "at compile time."?