[PATCH v2 00/15] s390x/pci: Implement migration for emulated devices

Konstantin Shkolnyy posted 15 patches 13 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260411022618.2136588-1-kshk@linux.ibm.com
Maintainers: Matthew Rosato <mjrosato@linux.ibm.com>, Farhan Ali <alifm@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Cornelia Huck <cohuck@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Ilya Leoshkevich <iii@linux.ibm.com>, David Hildenbrand <david@kernel.org>
hw/s390x/s390-pci-bus.c          | 278 +++++++++++++++++++++++++------
hw/s390x/s390-pci-inst.c         | 116 +++++++------
hw/s390x/s390-pci-vfio.c         |   4 +-
hw/s390x/s390-virtio-ccw.c       |   5 +
include/hw/s390x/s390-pci-bus.h  |  39 +++--
include/hw/s390x/s390-pci-inst.h |   3 +-
6 files changed, 320 insertions(+), 125 deletions(-)
[PATCH v2 00/15] s390x/pci: Implement migration for emulated devices
Posted by Konstantin Shkolnyy 13 hours ago
Up until now QEMU marked any zPCI device as "unmigratable."

This patch series adds support for migrating emulated devices, which are
simpler to migrate. It leaves VFIO devices still unmigratable.

To enable migration, the device state needs to be saved/restored to/from
the migration stream.

There are 2 kinds of emulated devices - those that use the zPCI IOMMU page
table emulation in QEMU (e.g., Intel IGB NIC), and those that don't (virtio).
This is important to note for testing purposes.

This change was tested on IGB, virtio-net and virtio-blk devices by running
I/O on them while performing "virsh managedsave, virsh start" and also live migration to another host and back.

Changes in v2:
 - Block migration for machine versions 11.0 and earlier.
   Because the current version is still 11.0, migration will start working when
   QEMU gets moved to 11.1 by the following patch:
   https://lore.kernel.org/qemu-devel/20260331140347.653404-1-cohuck@redhat.com/

Konstantin Shkolnyy (14):
  s390x/pci: Create function to contain translation status check
  s390x/pci: Move iommu_mr from S390PCIIOMMU to S390PCIBusDevice
  s390x/pci: Move dm_mr from S390PCIIOMMU to S390PCIBusDevice
  s390x/pci: Move iotlb from S390PCIIOMMU to S390PCIBusDevice
  s390x/pci: Remove a ptr to S390PCIBusDevice from S390PCIIOMMU
  s390x/pci: Move/rename enabled from S390PCIIOMMU to S390PCIBusDevice
  s390x/pci: Move dma_limit from S390PCIIOMMU to S390PCIBusDevice
  s390x/pci: Move g_iota from S390PCIIOMMU to S390PCIBusDevice
  s390x/pci: Move pba from S390PCIIOMMU to S390PCIBusDevice
  s390x/pci: Move pal from S390PCIIOMMU to S390PCIBusDevice
  s390x/pci: Move max_dma_limit from S390PCIIOMMU to S390PCIBusDevice
  s390x/pci: Add a comment explaining S390PCIIOMMU purpose
  s390x/pci: Implement migration for emulated devices
  s390x/pci: Create function to contain fmb_timer start

Matthew Rosato (1):
  s390x/pci: implement IOMMU replay

 hw/s390x/s390-pci-bus.c          | 278 +++++++++++++++++++++++++------
 hw/s390x/s390-pci-inst.c         | 116 +++++++------
 hw/s390x/s390-pci-vfio.c         |   4 +-
 hw/s390x/s390-virtio-ccw.c       |   5 +
 include/hw/s390x/s390-pci-bus.h  |  39 +++--
 include/hw/s390x/s390-pci-inst.h |   3 +-
 6 files changed, 320 insertions(+), 125 deletions(-)

-- 
2.34.1