[PATCH v2 0/6] VFIO: cpr-transfer fixes

Zhenzhong Duan posted 6 patches 5 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250928085432.40107-1-zhenzhong.duan@intel.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Alex Williamson <alex.williamson@redhat.com>, "Cédric Le Goater" <clg@redhat.com>, Steve Sistare <steven.sistare@oracle.com>
include/hw/vfio/vfio-cpr.h |  2 +-
accel/kvm/kvm-all.c        | 14 ++++++--------
hw/vfio/cpr-legacy.c       | 22 +++++++++++++++-------
hw/vfio/iommufd.c          |  8 ++++----
hw/vfio/listener.c         |  4 ++--
5 files changed, 28 insertions(+), 22 deletions(-)
[PATCH v2 0/6] VFIO: cpr-transfer fixes
Posted by Zhenzhong Duan 5 hours ago
Hi,

Patch1: fixed an error restore path when virtio-mem is configured.
Patch2: fixed assert failure on error restore path, this issue happens
no matter if virtio-mem is configured.
Some trick is played to trigger the error path,
see https://github.com/yiliu1765/qemu/commit/494d19e7f7242dbc47d7f236937cde0c396a4a7c

Patch3-4: issue only happens with two or more VFIO devices, no issue
if only one VFIO device.

Patch5: fix a bug that impact "query-balloon" execution

Patch6: SIGSEGV if I send "query-balloon" to source qmp monitor,
I'm not quite sure if it's deserved to be fixed, as guest has been
migrated to destination, it's not a big issue for source qemu to
SIGSEGV?

Thanks
Zhenzhong

Changelog:
v2:
- minor polishment to commit log (Steve)
- keep kvm_state so "query-balloon" could work after CPR-transfer (Markus)
- add a fix which is found during "query-balloon" execution
- rebased to master

Zhenzhong Duan (6):
  vfio/container: Remap only populated parts in a section
  vfio/cpr-legacy: drop an erroneous assert
  vfio/iommufd: Set cpr.ioas_id on source side for CPR transfer
  vfio/iommufd: Restore vbasedev's reference to hwpt after CPR transfer
  accel/kvm: Fix an erroneous check on coalesced_mmio_ring
  accel/kvm: Fix SIGSEGV when execute "query-balloon" after CPR transfer

 include/hw/vfio/vfio-cpr.h |  2 +-
 accel/kvm/kvm-all.c        | 14 ++++++--------
 hw/vfio/cpr-legacy.c       | 22 +++++++++++++++-------
 hw/vfio/iommufd.c          |  8 ++++----
 hw/vfio/listener.c         |  4 ++--
 5 files changed, 28 insertions(+), 22 deletions(-)

-- 
2.47.1