From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 601CC1E47A5 for ; Sat, 15 Nov 2025 09:36:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763199388; cv=none; b=H9B8ulNKB550xMPQX+jfQSXMD08E2hWVsbxml1ijgo81LpJZTVCdi5fUzezmQ8xYz97JzUFF60UZNIkWv/ArakFSTXymk0x4JCepcq5j2aI86NpE2tyDFP6sEBl27qChJbz8zk/qnAUp3JRhl9RzjY5RFuGcchiENCo5zwX9keU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763199388; c=relaxed/simple; bh=UQVFeJZr0401KX1N/k/ogaXP4dW5OIP3VmbTx9eJ0p4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cb7tpn259ZBnJkLqrjP+vCGwRUstuUEPzzm4phN/U2FeoZxfZ5KTwLlEDLq4ywhSYZjy/p5oNqUNw6NUp3GEB/s74IHpbR3A4DDNO7YQ4SzFPuvamjkllbMbGQ1/B9g9yGHh3YM+YaiuDnX8EM6nXBmBi/c1YmwbetHeiT54RTk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dGxzfoXl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dGxzfoXl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 483C6C113D0; Sat, 15 Nov 2025 09:36:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763199387; bh=UQVFeJZr0401KX1N/k/ogaXP4dW5OIP3VmbTx9eJ0p4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dGxzfoXlLnRHLFr5Iy+HgSyVz8Mf24TyR4OMdm2IHhWYyyw5lvhnGu1juDXcxNUkp QGhzi4JzLJsO3a+Z5xAT7xWd+MWzPyyx6vz4jvLNbTuQ1z76N3iBJpinvuFeHy843t oTWlLJWPDqqzXfL8c1qC8ZIeGVbv7lhEq4qH4op6A+dTztPFhuvt2s7/V6kahITEd2 3GaNsGO0s/w16mxXH8zmm4SBsTxJDfykXeINuvSgDFhuZM7l2O1Y/qg5XIz4OhiHHE 9G0bjLz0Z9QZFPaZt+OqQXbfhF9gn/h1IHT3Fuz1Jdv5I0MrIxaoqfRmHqymK78Xs+ X5RVw3cugcXIA== Date: Sat, 15 Nov 2025 11:36:19 +0200 From: Mike Rapoport To: Pratyush Yadav Cc: Pasha Tatashin , akpm@linux-foundation.org, bhe@redhat.com, jasonmiu@google.com, arnd@arndb.de, coxu@redhat.com, dave@vasilevsky.ca, ebiggers@google.com, graf@amazon.com, kees@kernel.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-mm@kvack.org Subject: Re: [PATCH v1 04/13] kho: Verify deserialization status and fix FDT alignment access Message-ID: References: <20251114155358.2884014-1-pasha.tatashin@soleen.com> <20251114155358.2884014-5-pasha.tatashin@soleen.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: On Fri, Nov 14, 2025 at 05:52:37PM +0100, Pratyush Yadav wrote: > On Fri, Nov 14 2025, Pasha Tatashin wrote: > > > @@ -1377,16 +1387,12 @@ static void __init kho_release_scratch(void) > > > > void __init kho_memory_init(void) > > { > > - struct folio *folio; > > - > > if (kho_in.scratch_phys) { > > kho_scratch = phys_to_virt(kho_in.scratch_phys); > > kho_release_scratch(); > > > > - kho_mem_deserialize(kho_get_fdt()); > > - folio = kho_restore_folio(kho_in.fdt_phys); > > - if (!folio) > > - pr_warn("failed to restore folio for KHO fdt\n"); > > + if (!kho_mem_deserialize(kho_get_fdt())) > > + kho_in.fdt_phys = 0; > > The folio restore does serve a purpose: it accounts for that folio in > the system's total memory. See the call to adjust_managed_page_count() > in kho_restore_page(). In practice, I don't think it makes much of a > difference, but I don't see why not. This page is never freed, so adding it to zone managed pages or keeping it reserved does not change anything. > > } else { > > kho_reserve_scratch(); > > } > > -- > Regards, > Pratyush Yadav -- Sincerely yours, Mike.