On Tue, Nov 25, 2025 at 11:47:37AM +0100, Marek Marczykowski-Górecki wrote:
> On Tue, Nov 25, 2025 at 09:20:55AM +0100, Jürgen Groß wrote:
> > On 19.11.25 23:47, Jason Andryuk wrote:
> > > The goal is to fix s2idle and S3 for Xen PV devices.  A domain resuming
> > > from s3 or s2idle disconnects its PV devices during resume.  The
> > > backends are not expecting this and do not reconnect.
> > > 
> > > 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 the
> > > suspend/resume callbacks remained.
> > > 
> > > .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.
> > > 
> > > 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.
> > > 
> > > Change xenbus_pm_ops to use .freeze/thaw/restore and drop the
> > > .suspend/resume hook.  This matches the use in drivers/xen/manage.c for
> > > save/restore and live migration.  With .suspend/resume empty, PV devices
> > > are left connected during s2idle and s3, so PV devices are not changed
> > > and work after resume.
> > > 
> > > Signed-off-by: Jason Andryuk <[email protected]>
> > 
> > Acked-by: Juergen Gross <[email protected]>
> > 
> > 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.
> 
> 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/

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

Attachment: signature.asc
Description: PGP signature

Reply via email to