From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b4-smtp.messagingengine.com (fhigh-b4-smtp.messagingengine.com [202.12.124.155]) (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 979851A9F9D for ; Sun, 30 Nov 2025 02:56:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.155 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764471403; cv=none; b=mn38E/HJqi5F5yh7NmkLbSguTXqWNKi4hQ5nvevVe875gc/c9lGb+RXH4DOETaRn8nuj1CCr7vBvR04IC4NJWj2ctXrxFGoh4LmYFZRK808t3JEFnM0C1cX7J1oYn0JuzIQq/aKX6MaqWcDguUzNXLYg1Mr26EMojqCNJVtD2Z0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764471403; c=relaxed/simple; bh=4m110n9JUNHO8wmnd6VhsY3S4AHuVhNPtydG+1RMKRA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CGVRm4sFTENmrtc+eEO4p+yonkSgru5EoFGaRscFfe7Ec47kT3xlQTE0v3Fw/IPqXTt3hhu3r4CpgGGOt3RkD3yIla3em4EKT09cfML7WdsMjbRlY0mzrnsjc5lSc07HGNOvz6VKj7QgWTMToHn3/WWH1LHkw05xaH/23J1RX5c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=invisiblethingslab.com; spf=pass smtp.mailfrom=invisiblethingslab.com; dkim=pass (2048-bit key) header.d=invisiblethingslab.com header.i=@invisiblethingslab.com header.b=GLYubI8k; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=X9Vl90Gx; arc=none smtp.client-ip=202.12.124.155 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=invisiblethingslab.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=invisiblethingslab.com header.i=@invisiblethingslab.com header.b="GLYubI8k"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="X9Vl90Gx" Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id BF7187A0048; Sat, 29 Nov 2025 21:56:40 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Sat, 29 Nov 2025 21:56:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1764471400; x=1764557800; bh=uPo4d6C1SsuzKK9LFQrXRnujjP3GN628/AWhH5wC0QA=; b= GLYubI8knKw8x//gj42JQe5LrAsmVmaD9A+Wu24RM9OrNHqn2/Hyy6HEfjFtSDDM TEoT1poVyQY9udWF54TUkOoEOxi1BslAtwMpgukDUVnabhs9ag8+PxnVra3dt5xZ 5HoeMP8Y05gBDvOrBLMR6r/3JpL5r4U+wbP0V0oh3h2/DQOUsZlkTJOZ/PD+iqyE GD0ph1M9d0Ac3v+PArBQL0sAVhvR0ZJsEf4/N0hwrh8QUxP+KQvkOE7Pl5kFgnzl YQxMMVoL88IxLeO1uiWhQR+sod/wWJsBfNVq+jjinAdnWI3MOkPXkdYakb7qH1Iw HQLx51b6Nq+TSTB5jFMcbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1764471400; x=1764557800; bh=uPo4d6C1SsuzKK9LFQrXRnujjP3GN628/AW hH5wC0QA=; b=X9Vl90GxUmaUbB2Vufu4K27OkLAvTZv3VJYLzG2v1P/36KlJyT4 q1Wmt5b7+7bxivSPRE/pGKkGWU8hbpQvCPfIQSwlXAmkxjEr1AnFYtsAVv5R2G+H d+e/+An7z4MdgDgt8E3c+bt0fIF0XHLcNkxy2rCBLz5nDT6GRGIGzBmGdCfLATm5 2dW+uGKeZygNwoFckaAndrrarAyx+SFzAO6HjlUr8RoldosrsQwTmT6NsZsxHTyg y9KnS0zzIhI9RCYWTpEESGeUOQxpSlqbLq3G5Z8jdYi2eqqA41UJUiMQeUaNZkgE OZVzabaX8ZrST0xgVtLVRCK4oK/B1RUGQZQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvheefjeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesghdtreertddtjeenucfhrhhomhepofgrrhgvkhcu ofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinhhvih hsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhepueekteet gefggfekudehteegieeljeejieeihfejgeevhfetgffgteeuteetueetnecuffhomhgrih hnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrg gsrdgtohhmpdhnsggprhgtphhtthhopeejpdhmohguvgepshhmthhpohhuthdprhgtphht thhopehjghhrohhsshesshhushgvrdgtohhmpdhrtghpthhtohepjhgrshhonhdrrghnug hrhihukhesrghmugdrtghomhdprhgtphhtthhopehsshhtrggsvghllhhinhhisehkvghr nhgvlhdrohhrghdprhgtphhtthhopeholhgvkhhsrghnughrpghthihshhgthhgvnhhkoh esvghprghmrdgtohhmpdhrtghpthhtohephigrnhhnrdhsihhonhhnvggruhesvhgrthgv shdrthgvtghhpdhrtghpthhtohepgigvnhdquggvvhgvlheslhhishhtshdrgigvnhhprh hojhgvtghtrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdr khgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i1568416f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 29 Nov 2025 21:56:38 -0500 (EST) Date: Sun, 30 Nov 2025 03:56:37 +0100 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: =?utf-8?B?SsO8cmdlbiBHcm/Dnw==?= Cc: Jason Andryuk , Stefano Stabellini , Oleksandr Tyshchenko , Yann Sionneau , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] xenbus: Use .freeze/.thaw to handle xenbus devices Message-ID: References: <20251119224731.61497-1-jason.andryuk@amd.com> <20251119224731.61497-2-jason.andryuk@amd.com> <1c991699-51b7-4284-8179-6bc78f8f4eac@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DJTHw7pL0k1QweeN" Content-Disposition: inline In-Reply-To: --DJTHw7pL0k1QweeN Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Date: Sun, 30 Nov 2025 03:56:37 +0100 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: =?utf-8?B?SsO8cmdlbiBHcm/Dnw==?= Cc: Jason Andryuk , Stefano Stabellini , Oleksandr Tyshchenko , Yann Sionneau , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] xenbus: Use .freeze/.thaw to handle xenbus devices On Tue, Nov 25, 2025 at 11:47:37AM +0100, Marek Marczykowski-G=C3=B3recki w= rote: > On Tue, Nov 25, 2025 at 09:20:55AM +0100, J=C3=BCrgen Gro=C3=9F wrote: > > On 19.11.25 23:47, Jason Andryuk wrote: > > > The goal is to fix s2idle and S3 for Xen PV devices. A domain resumi= ng > > > from s3 or s2idle disconnects its PV devices during resume. The > > > backends are not expecting this and do not reconnect. > > >=20 > > > b3e96c0c7562 ("xen: use freeze/restore/thaw PM events for suspend/ > > > resume/chkpt") changed xen_suspend()/do_suspend() from > > > PMSG_SUSPEND/PMSG_RESUME to PMSG_FREEZE/PMSG_THAW/PMSG_RESTORE, but t= he > > > suspend/resume callbacks remained. > > >=20 > > > .freeze/restore are used with hiberation where Linux restarts in a new > > > place in the future. .suspend/resume are useful for runtime power > > > management for the duration of a boot. > > >=20 > > > The current behavior of the callbacks works for an xl save/restore or > > > live migration where the domain is restored/migrated to a new location > > > and connecting to a not-already-connected backend. > > >=20 > > > Change xenbus_pm_ops to use .freeze/thaw/restore and drop the > > > .suspend/resume hook. This matches the use in drivers/xen/manage.c f= or > > > save/restore and live migration. With .suspend/resume empty, PV devi= ces > > > are left connected during s2idle and s3, so PV devices are not changed > > > and work after resume. > > >=20 > > > Signed-off-by: Jason Andryuk > >=20 > > Acked-by: Juergen Gross > >=20 > > Marek, could you please give this patch a try with QubesOS? I think this > > patch should be verified not to break your use cases regarding suspend / > > resume. >=20 > Sure, but I can't promise it will be this week, I have some deadlines to > meet... Regardless of my other response, those two patches appear to work fine across domU suspend/resume (both the S3 and s2idle variants). Note for s2idle I tested it together with other qubes patches: https://github.com/QubesOS/qubes-linux-kernel/ --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab --DJTHw7pL0k1QweeN Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAmkrsmUACgkQ24/THMrX 1yyEDgf9H/lvmlm5yVjaPVZIwF4ex5v8T3scudwiA609KA7FDKejFdpGYbZFbFD1 sQM4/cCb+0mbRCM8x0zMLP1rheNdxp/+du7bEI7RfGedtQcI61foBaXVpxde9nE6 aup2+5gkYk6gGM/6qtmIZW0ugt3TPb96q8xeTmBDGLx77hDqBiwd03fsjNlQJslp J1oU2td3kl4JAxSbug85dkVV4cecPVz99vbYUa02NnePrWGVunaAzHUe/w3lCK43 bIUMF740zEtZTbeJuqlRvF6oPFSeBTSWgeMyfQMN01Agk+IENxCCgvSXZRk+t1q6 xf72v/rqBvVChqJ/FQmX6yr5cXpFrQ== =nS3x -----END PGP SIGNATURE----- --DJTHw7pL0k1QweeN--