From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4E25C02199 for ; Sun, 9 Feb 2025 15:10:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E461D6B0082; Sun, 9 Feb 2025 10:10:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DF5FE6B0083; Sun, 9 Feb 2025 10:10:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CBE366B0085; Sun, 9 Feb 2025 10:10:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id AC9AE6B0082 for ; Sun, 9 Feb 2025 10:10:52 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 5C5181616B7 for ; Sun, 9 Feb 2025 15:10:52 +0000 (UTC) X-FDA: 83100743544.12.E994209 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf19.hostedemail.com (Postfix) with ESMTP id 9259E1A000A for ; Sun, 9 Feb 2025 15:10:50 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=vRjbl4gP; spf=pass (imf19.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1739113850; a=rsa-sha256; cv=none; b=8at987mTr9uQb0jq6wX2SCFja4M1969Af3ZUbrNKRXHf9o67sWbIhFiYmr+0JOKiWYfB/Y +0CoYVkUqu8RhzTIuW7A/aPBcQcghqW+4yDAtRPZoKIp1r4NFFBHG3HTWdFTm8ZuRgqNCU WLSYGD/CENJ1v7O14kYLhXc9j9bGsGU= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=vRjbl4gP; spf=pass (imf19.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1739113850; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=uvkWI3cX2anxu18b6N3GYV6CIu0hENpPT5AGqx9H+vc=; b=nbam/WRehQKYIxa1lBBYAToXvAlPN73SZBRAFBjlrkD8DcP8mBtx8l2EwhwqtjyiYu+KoF eG5qc5ZTau1YF+5B7l9KjZ+6/s1VNtQPKGG37gIL0R0tMqjpM0c4Nj8gDN85a+18EtkXY2 0xOAM4q/qZ19Rei53UeUan0N56q1uUg= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id CCB195C3FDA; Sun, 9 Feb 2025 15:10:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5A64C4CEE2; Sun, 9 Feb 2025 15:10:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739113849; bh=J7RPEEvR3YN2Zw3FJPrsXlkP5CHQ4ry6huE55PuC5gQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vRjbl4gPV6wrAL1Op6b4UG/ZsW9dGApg6AGSIrvaNSkhp6cSEu2/MeZlFcqZZwjMp VGmvNeICYY50N390bDunkJ9Pxo8RsJ0xTNfcJ1laLEVHM/S3P4HVCK7Ylo35ky9VjV O3IQhIQFVExy2+rPS31ctiOp4I+goc35/Loe/O/4jtbq+ywEvbpBhgIMSbwVd3fu8Q 0f37CHSCjlpBrAGCyeVigrg+mNP3UavBOj7iXkp6DeeSFvXuwwlhF4XECVIDSp98q8 /uFv9cqyP3oCkixs4eyYjxu9KhtbCiIeLV+7GxHChQk+OC0ltm6uGrYLdetui3ZO6D h8fHOZbzeBvEw== Date: Sun, 9 Feb 2025 17:10:28 +0200 From: Mike Rapoport To: Krzysztof Kozlowski Cc: linux-kernel@vger.kernel.org, Alexander Graf , Andrew Morton , Andy Lutomirski , Anthony Yznaga , Arnd Bergmann , Ashish Kalra , Benjamin Herrenschmidt , Borislav Petkov , Catalin Marinas , Dave Hansen , David Woodhouse , Eric Biederman , Ingo Molnar , James Gowans , Jonathan Corbet , Mark Rutland , Paolo Bonzini , Pasha Tatashin , "H. Peter Anvin" , Peter Zijlstra , Pratyush Yadav , Rob Herring , Rob Herring , Saravana Kannan , Stanislav Kinsburskii , Steven Rostedt , Thomas Gleixner , Tom Lendacky , Usama Arif , Will Deacon , devicetree@vger.kernel.org, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org Subject: Re: [PATCH v4 14/14] Documentation: KHO: Add memblock bindings Message-ID: References: <20250206132754.2596694-1-rppt@kernel.org> <20250206132754.2596694-15-rppt@kernel.org> <45df0d7a-622a-4268-9683-c5c6067483c3@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45df0d7a-622a-4268-9683-c5c6067483c3@kernel.org> X-Stat-Signature: k76zz6se4xq783thig7pg695cgy1fnwu X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 9259E1A000A X-Rspam-User: X-HE-Tag: 1739113850-19527 X-HE-Meta: U2FsdGVkX1+pxKTbKHiT7kXDnaa+S7n2fNJZSgyubHZidnApVJO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O59iJ7HkkLFfxWnirha7O8p7gKbruqeIUJfKJd0WlG0Rs0RptqGJdmLFtLWgYFN8422hs4t+05VevyAriyJxbfc5iZccJMq1uAc7GNDyb5UqnQaLsTJPjEn1vfkQVDFHNSEeieG2JpicpxN6PifQ51Wl/ZUQ5jXAtkx/EAJTsjc4jIL0AVAJdofBV1y/SxrFkTqjG05t4qwjUl+hWnrELEIcFrcduc9ZrjJQWwFaKukDp1f+MqBgSg/NN5LfwweH2n5Dgj+0tNxhUMtnnWP6JwQjlModx5uVVuqmRiA4/+Xp2/tIZwbitidp3lKeRJrKXRnSyFPR/5kCnRPciWFo3aWom/P1hRMnNmxsqo= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Sun, Feb 09, 2025 at 11:29:41AM +0100, Krzysztof Kozlowski wrote: > On 06/02/2025 14:27, Mike Rapoport wrote: > > From: "Mike Rapoport (Microsoft)" > > > > We introduced KHO into Linux: A framework that allows Linux to pass > > metadata and memory across kexec from Linux to Linux. KHO reuses fdt > > as file format and shares a lot of the same properties of firmware-to- > > Linux boot formats: It needs a stable, documented ABI that allows for > > forward and backward compatibility as well as versioning. > > Please use subject prefixes matching the subsystem. You can get them for > example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory > your patch is touching. For bindings, the preferred subjects are > explained here: > https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters These are not devicetree binding for communicating data from firmware to the kernel. These bindings are specific to KHO which is perfectly reflected by the subject. Just a brief reminder from v2 discussion: (https://lore.kernel.org/linux-mm/20231222193607.15474-1-graf@amazon.com/) "For quick reference: KHO is a new mechanism this patch set introduces which allows Linux to pass arbitrary memory and metadata between kernels on kexec. I'm reusing FDTs to implement the hand over protocol, as Linux-to-Linux boot communication holds very similar properties to firmware-to-Linux boot communication. So this binding is not about hardware; it's about preserving Linux subsystem state across kexec. For more details, please refer to the KHO documentation which is part of patch 7 of this patch set: https://lore.kernel.org/lkml/20231222195144.24532-2-graf@amazon.com/" and "This is our own data structure for KHO that just happens to again contain a DT structure. The reason is simple: I want a unified, versioned, introspectable data format that is cross platform so you don't need to touch every architecture specific boot passing logic every time you want to add a tiny piece of data." > > As first user of KHO, we introduced memblock which can now preserve > > memory ranges reserved with reserve_mem command line options contents > > across kexec, so you can use the post-kexec kernel to read traces from > > the pre-kexec kernel. > > > > This patch adds memblock schemas similar to "device" device tree ones to > > a new kho bindings directory. This allows us to force contributors to > > document the data that moves across KHO kexecs and catch breaking change > > during review. > > > > Co-developed-by: Alexander Graf > > Signed-off-by: Alexander Graf > > Signed-off-by: Mike Rapoport (Microsoft) > > --- > > .../kho/bindings/memblock/reserve_mem.yaml | 41 ++++++++++++++++++ > > .../bindings/memblock/reserve_mem_map.yaml | 42 +++++++++++++++++++ > > 2 files changed, 83 insertions(+) > > create mode 100644 Documentation/kho/bindings/memblock/reserve_mem.yaml > > create mode 100644 Documentation/kho/bindings/memblock/reserve_mem_map.yaml > > > > diff --git a/Documentation/kho/bindings/memblock/reserve_mem.yaml b/Documentation/kho/bindings/memblock/reserve_mem.yaml > > new file mode 100644 > > index 000000000000..7b01791b10b3 > > --- /dev/null > > +++ b/Documentation/kho/bindings/memblock/reserve_mem.yaml > > @@ -0,0 +1,41 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/memblock/reserve_mem.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Memblock reserved memory > > + > > +maintainers: > > + - Mike Rapoport > > + > > +description: | > > + Memblock can serialize its current memory reservations created with > > + reserve_mem command line option across kexec through KHO. > > + The post-KHO kernel can then consume these reservations and they are > > + guaranteed to have the same physical address. > > + > > +examples: > > + - | > > + reserve_mem { > > Again, do not introduce own coding style. > > I don't understand why do you need this in the first place. There is > already reserved-memory block. Because these regions are not "... designed for the special usage by various device drivers" and should not be exclude by the operating system from normal usage. > Best regards, > Krzysztof -- Sincerely yours, Mike.