This patch series enables live guest migration for s390 guests using
AP (Adjunct Processor) crypto devices passed through via the VFIO
framework.
The s390 AP architecture provides cryptographic coprocessor and accelerator
functions to guests. The vfio_ap device driver allows these AP devices to
be passed through to KVM guests, giving them access to the cryptographic
capabilities of CEXxS crypto cards.
Previously, guests using vfio-ap devices could not be migrated because the
device was marked as unmigratable. This series implements the necessary
QEMU-side support to enable migration by:
* Removing the migration blocker and adding proper VMState infrastructure
* Implementing the VFIO migration callbacks that coordinate with the kernel
vfio_ap driver to save and restore device state
The actual AP device state (queue configurations, crypto adapter
assignments, etc.) is managed entirely by the kernel vfio_ap driver and
transferred via the VFIO migration protocol. QEMU's role is to coordinate
the migration process and ensure proper sequencing of state transfers.
This implementation follows the standard VFIO migration framework used by
other VFIO device types (GPUs, network adapters, etc.) and integrates
cleanly with QEMU's existing migration infrastructure.
Dependencies:
------------
* Requires corresponding kernel patches that implement the VFIO migration
protocol in the vfio_ap driver
- see kernel patch series at https://lkml.org/lkml/2026/4/7/1991
* Kernel must support VFIO_DEVICE_FEATURE_MIGRATION for vfio-ap devices
Anthony Krowiak (1):
hw/vfio/ap: Callbacks for migration of guests with pass-through access
to AP devices
Anthony Krowiak (1):
hw/vfio/ap: Extend vfio device state description to facilitate live
migration
hw/vfio/ap.c | 60 ++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 49 insertions(+), 11 deletions(-)
--
2.52.0