From: Zhenzhong Duan <zhenzhong.duan@intel.com>
To: qemu-devel@nongnu.org
Cc: alex.williamson@redhat.com, clg@redhat.com, mst@redhat.com,
jasowang@redhat.com, yi.l.liu@intel.com,
clement.mathieu--drif@eviden.com, eric.auger@redhat.com,
joao.m.martins@oracle.com, avihaih@nvidia.com,
xudong.hao@intel.com, giovanni.cabiddu@intel.com,
mark.gross@intel.com, arjan.van.de.ven@intel.com,
Zhenzhong Duan <zhenzhong.duan@intel.com>
Subject: [PATCH 0/5] vfio: relax the vIOMMU check
Date: Tue, 9 Sep 2025 22:36:56 -0400 [thread overview]
Message-ID: <20250910023701.244356-1-zhenzhong.duan@intel.com> (raw)
Hi,
This series relax the vIOMMU check and allows live migration with vIOMMU
without VFs using device dirty tracking. It's rewritten based on first 4
patches of [1] from Joao.
Currently what block us is the lack of dirty bitmap query with iommufd
before unmap. By adding that query in patch2 plus an extra optimization
in patch3 that let us simply read the dirty bit (without clearing it),
then an optimization in patch4 to handle a corner case of domain switch
in guest, finally we relax the check in patch5.
We tested VM live migration (running QAT workload in VM) with QAT
device passthrough, below matrix configs:
1.Scalable mode vIOMMU + IOMMUFD cdev mode
2.Scalable mode vIOMMU + legacy VFIO mode
3.legacy mode vIOMMU + IOMMUFD cdev mode
4.legacy mode vIOMMU + legacy VFIO mode
[1] https://github.com/jpemartins/qemu/commits/vfio-migration-viommu/
Thanks
Zhenzhong
Zhenzhong Duan (5):
vfio/iommufd: Add framework code to support getting dirty bitmap
before unmap
vfio/iommufd: Query dirty bitmap before DMA unmap
vfio/iommufd: Add IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR flag support
intel_iommu: Optimize unmap_bitmap during migration
vfio/migration: Allow live migration with vIOMMU without VFs using
device dirty tracking
hw/vfio/vfio-iommufd.h | 1 +
include/hw/vfio/vfio-device.h | 10 ++++++
include/system/iommufd.h | 2 +-
backends/iommufd.c | 5 +--
hw/i386/intel_iommu.c | 42 ++++++++++++++++++++++
hw/vfio/container-base.c | 5 +--
hw/vfio/device.c | 6 ++++
hw/vfio/iommufd.c | 66 +++++++++++++++++++++++++++++------
hw/vfio/migration.c | 6 ++--
backends/trace-events | 2 +-
10 files changed, 123 insertions(+), 22 deletions(-)
--
2.47.1
next reply other threads:[~2025-09-10 2:39 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 2:36 Zhenzhong Duan [this message]
2025-09-10 2:36 ` [PATCH 1/5] vfio/iommufd: Add framework code to support getting dirty bitmap before unmap Zhenzhong Duan
2025-09-19 9:30 ` Cédric Le Goater
2025-09-22 3:17 ` Duan, Zhenzhong
2025-09-22 8:27 ` Cédric Le Goater
2025-09-23 2:45 ` Duan, Zhenzhong
2025-09-23 7:06 ` Cédric Le Goater
2025-09-23 9:50 ` Duan, Zhenzhong
2025-09-10 2:36 ` [PATCH 2/5] vfio/iommufd: Query dirty bitmap before DMA unmap Zhenzhong Duan
2025-09-10 2:36 ` [PATCH 3/5] vfio/iommufd: Add IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR flag support Zhenzhong Duan
2025-09-19 10:27 ` Joao Martins
2025-09-22 5:49 ` Duan, Zhenzhong
2025-09-22 16:02 ` Cédric Le Goater
2025-09-22 16:06 ` Joao Martins
2025-09-22 17:01 ` Joao Martins
2025-09-23 2:50 ` Duan, Zhenzhong
2025-09-23 9:17 ` Joao Martins
2025-09-23 9:55 ` Duan, Zhenzhong
2025-09-23 10:06 ` Duan, Zhenzhong
2025-09-23 2:47 ` Duan, Zhenzhong
2025-10-09 10:20 ` Duan, Zhenzhong
2025-10-09 12:43 ` Cédric Le Goater
2025-10-10 4:09 ` Duan, Zhenzhong
2025-09-10 2:37 ` [PATCH 4/5] intel_iommu: Optimize unmap_bitmap during migration Zhenzhong Duan
2025-10-12 10:31 ` Yi Liu
2025-10-13 2:50 ` Duan, Zhenzhong
2025-10-13 12:56 ` Yi Liu
2025-10-14 2:31 ` Duan, Zhenzhong
2025-09-10 2:37 ` [PATCH 5/5] vfio/migration: Allow live migration with vIOMMU without VFs using device dirty tracking Zhenzhong Duan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250910023701.244356-1-zhenzhong.duan@intel.com \
--to=zhenzhong.duan@intel.com \
--cc=alex.williamson@redhat.com \
--cc=arjan.van.de.ven@intel.com \
--cc=avihaih@nvidia.com \
--cc=clement.mathieu--drif@eviden.com \
--cc=clg@redhat.com \
--cc=eric.auger@redhat.com \
--cc=giovanni.cabiddu@intel.com \
--cc=jasowang@redhat.com \
--cc=joao.m.martins@oracle.com \
--cc=mark.gross@intel.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xudong.hao@intel.com \
--cc=yi.l.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).