umber-kernel/drivers/xen
Jason Andryuk d39d675a43 xenbus: Use .freeze/.thaw to handle xenbus devices
[ Upstream commit e08dd1ee49838750a514e83c0aa60cd12ba6ecbb ]

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.

b3e96c0c75 ("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 <jason.andryuk@amd.com>
Acked-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20251119224731.61497-2-jason.andryuk@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-03-04 07:19:38 -05:00
..
events xen/events: Update virq_to_irq on migration 2025-09-09 09:09:30 +02:00
xen-pciback
xenbus xenbus: Use .freeze/.thaw to handle xenbus devices 2026-03-04 07:19:38 -05:00
xenfs
Kconfig mm: rename vm_ops->find_special_page() to vm_ops->find_normal_page() 2025-09-13 16:54:53 -07:00
Makefile
acpi.c
arm-device.c
balloon.c Partial revert "x86/xen: fix balloon target initialization for PVH dom0" 2026-02-26 14:59:01 -08:00
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c
features.c
gntalloc.c
gntdev-common.h xen/gntdev: remove struct gntdev_copy_batch from stack 2025-07-14 17:10:09 +02:00
gntdev-dmabuf.c drivers/xen/gntdev: use xen_pv_domain() instead of cached value 2025-09-08 17:01:36 +02:00
gntdev-dmabuf.h drivers/xen/gntdev: use xen_pv_domain() instead of cached value 2025-09-08 17:01:36 +02:00
gntdev.c Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
grant-dma-iommu.c
grant-dma-ops.c xen/virtio: Don't use grant-dma-ops when running as Dom0 2026-02-26 14:58:59 -08:00
grant-table.c xen: replace XENFEAT_auto_translated_physmap with xen_pv_domain() 2025-09-08 17:01:36 +02:00
manage.c xen: take system_transition_mutex on suspend 2025-09-22 10:16:55 +02:00
mcelog.c
mem-reservation.c
pci.c
pcpu.c
platform-pci.c
privcmd-buf.c
privcmd.c xen: replace XENFEAT_auto_translated_physmap with xen_pv_domain() 2025-09-08 17:01:36 +02:00
privcmd.h
pvcalls-back.c
pvcalls-front.c
pvcalls-front.h
swiotlb-xen.c xen: swiotlb: Open code map_resource callback 2025-09-12 00:18:20 +02:00
sys-hypervisor.c
time.c xen: Remove some deadcode (x) 2025-07-14 09:55:52 +02:00
unpopulated-alloc.c Partial revert "x86/xen: fix balloon target initialization for PVH dom0" 2026-02-26 14:59:01 -08:00
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
xen-front-pgdir-shbuf.c
xen-scsiback.c scsi: xen: scsiback: Fix potential memory leak in scsiback_remove() 2026-01-30 10:32:13 +01:00
xlate_mmu.c