All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] vfio/migration: Support manual clear vfio dirty log
@ 2021-03-10  9:41 Kunkun Jiang
  2021-03-10  9:41 ` [RFC PATCH 1/3] linux-headers: update against 5.12-rc2 and "vfio log clear" series Kunkun Jiang
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Kunkun Jiang @ 2021-03-10  9:41 UTC (permalink / raw)
  To: Alex Williamson, Michael S . Tsirkin, Cornelia Huck,
	Paolo Bonzini, Kirti Wankhede, Daniel P . Berrangé,
	Tarun Gupta, open list:All patches CC here
  Cc: shameerali.kolothum.thodi, Eric Auger, Peter Xu, Zenghui Yu,
	wanghaibin.wang, Keqian Zhu

Hi all,

In the past, we clear dirty log immediately after sync dirty log to
userspace. This may cause redundant dirty handling if userspace
handles dirty log iteratively:

After vfio clears dirty log, new dirty log starts to generate. These
new dirty log will be reported to userspace even if they are generated
before userspace handles the same dirty page.

Since a new dirty log tracking method for vfio based on iommu hwdbm[1]
has been introduced in the kernel and added a new capability named
VFIO_DIRTY_LOG_MANUAL_CLEAR, we can eliminate some redundant dirty
handling by supporting it.

This series include patches as below:
Patch 1:
- updated the linux-headers/linux/vfio.h from kernel side

Patch 2:
- introduced 'struct VFIODMARange' to describe a range of the given DMA
  mapping and with respect to a VFIO_IOMMU_MAP_DMA operation

Patch 3:
- implemented the operation to manual clear vfio dirty log, which can
  eliminate some redundant dirty handling

Thanks,
Kunkun Jiang

[1] https://lore.kernel.org/linux-iommu/20210310090614.26668-1-zhukeqian1@huawei.com/T/#mb168c9738ecd3d8794e2da14f970545d5820f863

Zenghui Yu (3):
  linux-headers: update against 5.12-rc2 and "vfio log clear" series
  vfio: Maintain DMA mapping range for the container
  vfio/migration: Support VFIO_IOMMU_DIRTY_PAGES_FLAG_CLEAR_BITMAP

 hw/vfio/common.c              | 207 ++++++++++++++++++++++++++++++++--
 include/hw/vfio/vfio-common.h |  10 ++
 linux-headers/linux/vfio.h    |  55 ++++++++-
 3 files changed, 264 insertions(+), 8 deletions(-)

-- 
2.23.0



^ permalink raw reply	[flat|nested] 14+ messages in thread
* [RFC PATCH 0/3] vfio/migration: Support manual clear vfio dirty log
@ 2021-05-08  9:31 Kunkun Jiang
  2021-05-10  7:42 ` Kunkun Jiang
  0 siblings, 1 reply; 14+ messages in thread
From: Kunkun Jiang @ 2021-05-08  9:31 UTC (permalink / raw)
  To: Alex Williamson, kevin.tian, Kirti Wankhede,
	open list : All patches CC here
  Cc: Zenghui Yu, wanghaibin.wang, Kunkun Jiang, Keqian Zhu

In the past, we clear dirty log immediately after sync dirty log to
userspace. This may cause redundant dirty handling if userspace
handles dirty log iteratively:

After vfio clears dirty log, new dirty log starts to generate. These
new dirty log will be reported to userspace even if they are generated
before userspace handles the same dirty page.

Since a new dirty log tracking method for vfio based on iommu hwdbm[1]
has been introduced in the kernel and added a new capability named
VFIO_DIRTY_LOG_MANUAL_CLEAR, we can eliminate some redundant dirty
handling by supporting it.

This series include patches as below:
Patch 1:
- updated the linux-headers/linux/vfio.h from kernel side

Patch 2:
- introduced 'struct VFIODMARange' to describe a range of the given DMA
  mapping and with respect to a VFIO_IOMMU_MAP_DMA operation

Patch 3:
- implemented the operation to manual clear vfio dirty log, which can
  eliminate some redundant dirty handling

History:
v1 -> v2:
- Add a new ioctl VFIO_IOMMU_DIRTY_PAGES_FLAG_GET_BITMAP_NOCLEAR to get
  vfio dirty log when support manual clear.

Thanks,
Kunkun Jiang

[1]
IOMMU part: https://lore.kernel.org/linux-iommu/20210507102211.8836-1-zhukeqian1@huawei.com/
VFIO part: https://lore.kernel.org/kvm/20210507103608.39440-1-zhukeqian1@huawei.com/

Zenghui Yu (3):
  linux-headers: update against 5.12 and "manual clear vfio dirty log"
    series
  vfio: Maintain DMA mapping range for the container
  vfio/migration: Add support for manual clear vfio dirty log

 hw/vfio/common.c              | 211 ++++++++++++++++++++++++++++++++--
 include/hw/vfio/vfio-common.h |  10 ++
 linux-headers/linux/vfio.h    |  61 +++++++++-
 3 files changed, 273 insertions(+), 9 deletions(-)

-- 
2.23.0



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-05-10  7:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10  9:41 [RFC PATCH 0/3] vfio/migration: Support manual clear vfio dirty log Kunkun Jiang
2021-03-10  9:41 ` [RFC PATCH 1/3] linux-headers: update against 5.12-rc2 and "vfio log clear" series Kunkun Jiang
2021-03-10  9:41 ` [RFC PATCH 2/3] vfio: Maintain DMA mapping range for the container Kunkun Jiang
2021-03-10  9:41 ` [RFC PATCH 3/3] vfio/migration: Support VFIO_IOMMU_DIRTY_PAGES_FLAG_CLEAR_BITMAP Kunkun Jiang
2021-03-18  6:22 ` [RFC PATCH 0/3] vfio/migration: Support manual clear vfio dirty log Kunkun Jiang
2021-03-18  6:28 ` Tian, Kevin
2021-03-18  7:59   ` Kunkun Jiang
2021-03-18  9:04     ` Tian, Kevin
2021-03-18 12:28       ` Kunkun Jiang
2021-03-18 12:36         ` Tian, Kevin
2021-03-18 13:14           ` Kunkun Jiang
2021-03-23  2:48           ` Kunkun Jiang
2021-05-08  9:31 Kunkun Jiang
2021-05-10  7:42 ` Kunkun Jiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.