On 6/29/23 10:40, Zhenzhong Duan wrote:
> Hello,
>
> PATCH5 refactors the VFIO migration blocker related code based on
> suggestions from Joao and Cedric, so that code is simpler and
> "Migration disabled" printed in right case.
>
> But before that works, also found some hotplug bugs when testing
> blocker adding failed case. PATCH1-4 fix them.
>
> See patch description for details.
>
> v4: Rebased on [1] which contains Avihai's patchset [2]
> Add more patches to fix resource leak issue, split based on
> different fix TAG per Joao
> Change to not print "Migration disabled" with explicit
> enable-migration=off per Avihai
> Rename vfio_block_giommu_migration to vfio_viommu_preset per Joao
>
> v3: Add PATCH1,2 to fix hotplug bug
> Fix bugs in PATCH3 Avihai and Joao pointed out
>
> Tested vfio hotplug/unplug with vfio migration supported and unsupported cases,
> and different param of enable-migration=[on/off/auto] and -only-migratable.
>
> [1] https://github.com/legoater/qemu/tree/vfio-next
> [2] https://lists.nongnu.org/archive/html/qemu-devel/2023-06/msg06117.html
>
> Thanks
>
> Zhenzhong Duan (5):
> vfio/pci: Fix a segfault in vfio_realize
> vfio/pci: Free leaked timer in vfio_realize error path
Applied patch 1-2 to vfio-next. PR is sent.
Thanks,
C.
> vfio/pci: Disable INTx in vfio_realize error path
> vfio/pci: Free resources when vfio_migration_realize fails
> vfio/migration: Refactor and fix print of "Migration disabled"
>
> hw/vfio/common.c | 66 +++++++----------------------------
> hw/vfio/migration.c | 30 +++++++++-------
> hw/vfio/pci.c | 18 +++++++---
> include/hw/vfio/vfio-common.h | 7 ++--
> 4 files changed, 48 insertions(+), 73 deletions(-)
>