qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH Kernel v22 7/8] vfio iommu: Add migration capability to repor


From: Kirti Wankhede
Subject: Re: [PATCH Kernel v22 7/8] vfio iommu: Add migration capability to report supported features
Date: Wed, 20 May 2020 20:53:13 +0530
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0



On 5/20/2020 4:12 PM, Cornelia Huck wrote:
On Mon, 18 May 2020 11:26:36 +0530
Kirti Wankhede <address@hidden> wrote:

Added migration capability in IOMMU info chain.
User application should check IOMMU info chain for migration capability
to use dirty page tracking feature provided by kernel module.
User application must check page sizes supported and maximum dirty
bitmap size returned by this capability structure for ioctls used to get
dirty bitmap.

Signed-off-by: Kirti Wankhede <address@hidden>
---
  drivers/vfio/vfio_iommu_type1.c | 23 ++++++++++++++++++++++-
  include/uapi/linux/vfio.h       | 22 ++++++++++++++++++++++
  2 files changed, 44 insertions(+), 1 deletion(-)

(...)

diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
index a1dd2150971e..aa8aa9dcf02a 100644
--- a/include/uapi/linux/vfio.h
+++ b/include/uapi/linux/vfio.h
@@ -1013,6 +1013,28 @@ struct vfio_iommu_type1_info_cap_iova_range {
        struct  vfio_iova_range iova_ranges[];
  };
+/*
+ * The migration capability allows to report supported features for migration.
+ *
+ * The structures below define version 1 of this capability.
+ *
+ * The existence of this capability indicates IOMMU kernel driver supports

s/indicates/indicates that/

+ * dirty page tracking.
+ *
+ * pgsize_bitmap: Kernel driver returns supported page sizes bitmap for dirty
+ * page tracking.

"bitmap of supported page sizes for dirty page tracking" ?

+ * max_dirty_bitmap_size: Kernel driver returns maximum supported dirty bitmap
+ * size in bytes to be used by user application for ioctls to get dirty bitmap.

"maximum supported dirty bitmap size in bytes that can be used by user
applications when getting the dirty bitmap" ?


Done.

+ */
+#define VFIO_IOMMU_TYPE1_INFO_CAP_MIGRATION  1
+
+struct vfio_iommu_type1_info_cap_migration {
+       struct  vfio_info_cap_header header;
+       __u32   flags;
+       __u64   pgsize_bitmap;
+       __u64   max_dirty_bitmap_size;          /* in bytes */
+};
+
  #define VFIO_IOMMU_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
/**

Reviewed-by: Cornelia Huck <address@hidden>


Thanks.

Kirti



reply via email to

[Prev in Thread] Current Thread [Next in Thread]