[PATCH v2 0/2] Enable live migration of vfio-ap devices

Anthony Krowiak posted 2 patches 2 days, 1 hour ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260409141352.997844-1-akrowiak@linux.ibm.com
Maintainers: Cornelia Huck <cohuck@redhat.com>, Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Alex Williamson <alex@shazbot.org>, "Cédric Le Goater" <clg@redhat.com>, Tony Krowiak <akrowiak@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Jason Herne <jjherne@linux.ibm.com>
hw/vfio/ap.c | 60 ++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 49 insertions(+), 11 deletions(-)
[PATCH v2 0/2] Enable live migration of vfio-ap devices
Posted by Anthony Krowiak 2 days, 1 hour ago
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