[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v15 Kernel 6/7] vfio iommu: Adds flag to indicate dirty pages tra
From: |
Kirti Wankhede |
Subject: |
[PATCH v15 Kernel 6/7] vfio iommu: Adds flag to indicate dirty pages tracking capability support |
Date: |
Fri, 20 Mar 2020 01:46:43 +0530 |
Flag VFIO_IOMMU_INFO_DIRTY_PGS in VFIO_IOMMU_GET_INFO indicates that driver
support dirty pages tracking.
Signed-off-by: Kirti Wankhede <address@hidden>
Reviewed-by: Neo Jia <address@hidden>
---
drivers/vfio/vfio_iommu_type1.c | 3 ++-
include/uapi/linux/vfio.h | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
index e79c1ff6fb41..dce0a3e1e8b7 100644
--- a/drivers/vfio/vfio_iommu_type1.c
+++ b/drivers/vfio/vfio_iommu_type1.c
@@ -2368,7 +2368,8 @@ static long vfio_iommu_type1_ioctl(void *iommu_data,
info.cap_offset = 0; /* output, no-recopy necessary */
}
- info.flags = VFIO_IOMMU_INFO_PGSIZES;
+ info.flags = VFIO_IOMMU_INFO_PGSIZES |
+ VFIO_IOMMU_INFO_DIRTY_PGS;
info.iova_pgsizes = vfio_pgsize_bitmap(iommu);
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
index 2780a5742c04..4a886ff84c92 100644
--- a/include/uapi/linux/vfio.h
+++ b/include/uapi/linux/vfio.h
@@ -947,8 +947,9 @@ struct vfio_device_ioeventfd {
struct vfio_iommu_type1_info {
__u32 argsz;
__u32 flags;
-#define VFIO_IOMMU_INFO_PGSIZES (1 << 0) /* supported page sizes info */
-#define VFIO_IOMMU_INFO_CAPS (1 << 1) /* Info supports caps */
+#define VFIO_IOMMU_INFO_PGSIZES (1 << 0) /* supported page sizes info */
+#define VFIO_IOMMU_INFO_CAPS (1 << 1) /* Info supports caps */
+#define VFIO_IOMMU_INFO_DIRTY_PGS (1 << 2) /* supports dirty page tracking */
__u64 iova_pgsizes; /* Bitmap of supported page sizes */
__u32 cap_offset; /* Offset within info struct of first cap */
};
--
2.7.0
- [PATCH v15 Kernel 1/7] vfio: KABI for migration interface for device state, (continued)
- [PATCH v15 Kernel 1/7] vfio: KABI for migration interface for device state, Kirti Wankhede, 2020/03/19
- [PATCH v15 Kernel 2/7] vfio iommu: Remove atomicity of ref_count of pinned pages, Kirti Wankhede, 2020/03/19
- [PATCH v15 Kernel 3/7] vfio iommu: Add ioctl definition for dirty pages tracking., Kirti Wankhede, 2020/03/19
- [PATCH v15 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking., Kirti Wankhede, 2020/03/19
- [PATCH v15 Kernel 5/7] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap, Kirti Wankhede, 2020/03/19
- [PATCH v15 Kernel 6/7] vfio iommu: Adds flag to indicate dirty pages tracking capability support,
Kirti Wankhede <=
- [PATCH v15 Kernel 7/7] vfio: Selective dirty page tracking if IOMMU backed device pins pages, Kirti Wankhede, 2020/03/19