From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C45047B422 for ; Wed, 6 May 2026 16:06:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778083606; cv=none; b=SBM4r6jqccqGvueAXmTjt4iqSq4p59l5L8McNFb1BnwIkeFm1HLwICHkwAhgLnthyGItvQ9wkFpVXDRgsZtK9YIRHezw4HJkUbmlxp2Q3eSJL8xX0kDKwpHetpLEiVIXtdx0kpXE/hCV1liWBfR2AhpS2m45FwADwfxGteCt8Gk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778083606; c=relaxed/simple; bh=9/ChzgmkRMmu1yCG1PX3yiNoviR6u7Mx4EF9ITXHK8A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PNffowea+gdVwS8TeZeBpgoaFgbC1Mw8Tu9Ivf7HhlPtCd/vFo4VCGv7C19aO/un3HzQnOhSp3epLA116M7jIIcVOogEgNl/HOXb3iHNInHQ2SQe1vNu2WDUoOFoQNvKFgQOM2kK0gc/lzYeB+eRseX8R9PhtwLT/NRu1dpXDis= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b=ZcJkHPmb; arc=none smtp.client-ip=209.85.128.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="ZcJkHPmb" Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-7b37d84a6b3so69537637b3.2 for ; Wed, 06 May 2026 09:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1778083595; x=1778688395; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ip9FOPUnGn8oIskEdOYGUFzCLkqL2KBoKQm63orD1Do=; b=ZcJkHPmbPHFKv+esT+Wac4srgHckOgeWf6h8H3wrAMXxzOBnKb6y+vpHF+9sfuRE2t Naex8fP6+lbVt4KSQoBqfKq6yt59/1qoF/+pUKHZ32qMZGL1CY3wvqsJggxfBuGbuMEL o3q5ZyAgDVnCT0DCiIKXuxyJegbygvP3BamBUrfTwYd1aXVvg6MoEsn2BrndTXfW4Brz e6mXQULqAvsG3HI/6xyn5oh2dBsReZPEWp04F1FghCoa7Denr2F+aGJ45htz1waj8YhC 2TtFhSoJ2Sn0X0pFu9MgICzC73jvQG3H5gy5Na/CSqGpywDX3BVCkMNEBk5qi1entSMb VmFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778083595; x=1778688395; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ip9FOPUnGn8oIskEdOYGUFzCLkqL2KBoKQm63orD1Do=; b=OfkstwOpwGDECycNhqQVYOFE5ITSkK2KJ+DwsAt/d8ry0UC/NLx2OLUMaLutfuJOyF mbYhu8tob3NxOiCONvCOcJ3tNqRA11dq35AciPWC6rzRv4eNioDeZU9IRoYWx/AagPMc Dp6AL5oo69GkBWp/DJ0zXlG91ygNBFeG6zjq3bI90kXb9hv7dvTbPGn8aQqFk2AU2PKg 55LvQqYV7h4OZB+bR5QMbVs9n5oQjsePRrY+EKnjeKjNfuVKXO1Z7J+JBoiVDCFUcnI3 l7AM8eTEGLqQN3DVevf31RgebcXufUP+Wocxs94YNDgV0ntt9eemdnoGiEsz77Ud0tdc r3cQ== X-Forwarded-Encrypted: i=1; AFNElJ/lQJWo67sMM6HYLkcT6+839lEIc6Aa8bOfRTfYqSzuzL36gqYGjyiNiVTinshjp8vLrruXcaYtLxVYMiw=@vger.kernel.org X-Gm-Message-State: AOJu0YxFCAO7y7ag3uRWIZEEZfoMOLFFpAUcoNs9lc+YOvULssq30GlA XyMC6pPsRuml89U20dUy1pTnVpbnW0gD/djbUQhLMN05Tht4YFMc5zFGUyecFaOqlHQ= X-Gm-Gg: AeBDietB5bgdbzALhTmQ7klE0kjuDO7rl9T3FPYB3PitHeLQvnZ+JEsyXpPgYcx8lb7 HCj8AN5I2WsnRV1OcvXC3Qx0fXojNwYrWKH9X+Oc3f0dC9R0ijiXYPMGSwC6+cq3AS0lXMNWPEC PTNZujeXT2qQ4l6X1nMq2zxrZ9UrEsei7EGQvCR9GiIb71YAQYvgzJiv8/trlImiFhkmqU7Tlkk njRPZvrWdHUUa4DNkQPKQzXzROo16pAjCA1oBOhp/8/gR+lJqy3pUyQ2BZaK4RJs9VaHYChlj9I lvBP9MobT5V75xrp4gjCIpfoKPSJJENb+Xtc1yJrtqfnIAQtzsbT5MR0UkfhZ1I2dY5syfUDjIQ gqF/4kaBrS8B/Ei75I6n8mILXOk06uIWoWKUQiTHc/fFiHdvzK1D/rfrc8hlkz5lkKLfYhKvNrk ryrBOX6vNbbMm08S1N4CkJbgXNy0Q/mmn2x73XL32zxXZofzDgjL9QVn62e2J46NLBh+Rxja5T0 gXifr2i1wcmKqfKH+L/SRPdtYVAeyI+a64ntv9D X-Received: by 2002:a05:690c:102:b0:7bd:d303:fa19 with SMTP id 00721157ae682-7bdf5eef638mr42974727b3.46.1778083595206; Wed, 06 May 2026 09:06:35 -0700 (PDT) Received: from google.com (57.233.150.34.bc.googleusercontent.com. [34.150.233.57]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7bd6655f443sm82518017b3.19.2026.05.06.09.06.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2026 09:06:34 -0700 (PDT) Date: Wed, 6 May 2026 12:06:33 -0400 From: Pasha Tatashin To: Pratyush Yadav Cc: Pasha Tatashin , rppt@kernel.org, sourabhjain@linux.ibm.com, jbouron@amazon.com, akpm@linux-foundation.org, bhe@redhat.com, linux-kernel@vger.kernel.org, dan.carpenter@linaro.org, liaoyuanhong@vivo.com, rafael.j.wysocki@intel.com, piliu@redhat.com, kexec@lists.infradead.org, graf@amazon.com, mario.limonciello@amd.com Subject: Re: [PATCH v1 1/3] liveupdate: skip serialization for context-preserving kexec Message-ID: References: <20260506043200.2025677-5-pasha.tatashin@soleen.com> <20260506043200.2025677-6-pasha.tatashin@soleen.com> <2vxz34050wi7.fsf@kernel.org> <2vxzjytgzh5r.fsf@kernel.org> 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: <2vxzjytgzh5r.fsf@kernel.org> On 05-06 17:33, Pratyush Yadav wrote: > On Wed, May 06 2026, Pasha Tatashin wrote: > > > On 05-06 10:31, Pratyush Yadav wrote: > >> Hi Pasha, > >> > >> On Wed, May 06 2026, Pasha Tatashin wrote: > >> > >> > A preserve_context kexec returns to the current kernel, which > >> > is unrelated to live update where the state is passed to the next > >> > kernel. Skip liveupdate_reboot() in this case to avoid serialization > >> > and prevent sessions from being left in a frozen state upon return. > >> > >> Should we also stop KHO? Now it is stateless and always finalized. I am > > > > No. KHO preserves kernel internal memory; for context-preserved > > kexec, the 2nd kernel and the 1st kernel do not have overlapping > > memory. So, whatever the 1st kernel maintains in KHO is an internal > > detail of the 1st kernel. Once we return from the 2nd kernel to the 1st > > kernel, all KHO memory is going to stay as-is, and the 1st kernel can > > even perform a regular kexec or live update later. > > My point is that we keep KHO data in the 1st kernel but do not pass it > to the 2nd kernel via setup_data or the devicetree because it should not > use that memory anyway. So essentially we add a check in > kho_fill_kimage() and return early if preserve_context is set. This is a good point, I think we should do that to prevent passing via setup_data on preserve_context kexec. > > I don't think it makes much difference in practice so no strong > opinions. Fine either way. > > [...] > > -- > Regards, > Pratyush Yadav