[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250321133447.GA251739@nvidia.com>
Date: Fri, 21 Mar 2025 10:34:47 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Changyuan Lyu <changyuanl@...gle.com>
Cc: linux-kernel@...r.kernel.org, graf@...zon.com,
akpm@...ux-foundation.org, luto@...nel.org,
anthony.yznaga@...cle.com, arnd@...db.de, ashish.kalra@....com,
benh@...nel.crashing.org, bp@...en8.de, catalin.marinas@....com,
dave.hansen@...ux.intel.com, dwmw2@...radead.org,
ebiederm@...ssion.com, mingo@...hat.com, jgowans@...zon.com,
corbet@....net, krzk@...nel.org, rppt@...nel.org,
mark.rutland@....com, pbonzini@...hat.com,
pasha.tatashin@...een.com, hpa@...or.com, peterz@...radead.org,
ptyadav@...zon.de, robh+dt@...nel.org, robh@...nel.org,
saravanak@...gle.com, skinsburskii@...ux.microsoft.com,
rostedt@...dmis.org, tglx@...utronix.de, thomas.lendacky@....com,
usama.arif@...edance.com, will@...nel.org,
devicetree@...r.kernel.org, kexec@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org,
linux-mm@...ck.org, x86@...nel.org
Subject: Re: [PATCH v5 07/16] kexec: add Kexec HandOver (KHO) generation
helpers
On Wed, Mar 19, 2025 at 06:55:42PM -0700, Changyuan Lyu wrote:
> From: Alexander Graf <graf@...zon.com>
>
> Add the core infrastructure to generate Kexec HandOver metadata. Kexec
> HandOver is a mechanism that allows Linux to preserve state - arbitrary
> properties as well as memory locations - across kexec.
>
> It does so using 2 concepts:
>
> 1) State Tree - Every KHO kexec carries a state tree that describes the
> state of the system. The state tree is represented as hash-tables.
> Device drivers can add/remove their data into/from the state tree at
> system runtime. On kexec, the tree is converted to FDT (flattened
> device tree).
Why are we changing this? I much prefered the idea of having recursive
FDTs than this notion copying eveything into tables then out into FDT?
Now that we have the preserved pages mechanism there is a pretty
direct path to doing recursive FDT.
I feel like this patch is premature, it should come later in the
project along with a stronger justification for this approach.
IHMO keep things simple for this series, just the very basics.
> +int register_kho_notifier(struct notifier_block *nb)
> +{
> + return blocking_notifier_chain_register(&kho_out.chain_head, nb);
> +}
> +EXPORT_SYMBOL_GPL(register_kho_notifier);
And another different set of notifiers? :(
> +static int kho_finalize(void)
> +{
> + int err = 0;
> + void *fdt;
> +
> + fdt = kvmalloc(kho_out.fdt_max, GFP_KERNEL);
> + if (!fdt)
> + return -ENOMEM;
We go to all the trouble of keeping track of stuff in dynamic hashes
but still can't automatically size the fdt and keep the dumb uapi to
have the user say? :( :(
Jason
Powered by blists - more mailing lists