Skip to content

Enable live migration of vfio-ap devices

Anthony Krowiak qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 9 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2hw/vfio/ap: Extend vfio device state description to facilitate live migrationhw/vfio/ap.c+11 -82 replies
2/2hw/vfio/ap: Callbacks for migration of guests with pass-through access to AP deviceshw/vfio/ap.c+39 -47 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJason J. Herne
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

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

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(-)
Signature · 1 line
2.52.0