summaryrefslogtreecommitdiff
path: root/drivers/vfio/pci/pds/dirty.h
diff options
context:
space:
mode:
authorBrett Creeley <brett.creeley@amd.com>2023-11-16 16:12:07 -0800
committerAlex Williamson <alex.williamson@redhat.com>2023-12-04 14:33:21 -0700
commit2e7c6feb4ef5257189819359e754625ccf5a1d6c (patch)
tree02bb2ebf14788a4484cd0752996c18f5bdf7c2f9 /drivers/vfio/pci/pds/dirty.h
parent0c320f223ee6892a413428051f35bebf85fe83d3 (diff)
vfio/pds: Add multi-region support
Only supporting a single region/range is limiting, wasteful, and in some cases broken (i.e. when there are large gaps in the iova memory ranges). Fix this by adding support for multiple regions based on what the device tells the driver it can support. Signed-off-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Link: https://lore.kernel.org/r/20231117001207.2793-7-brett.creeley@amd.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/pci/pds/dirty.h')
-rw-r--r--drivers/vfio/pci/pds/dirty.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/vfio/pci/pds/dirty.h b/drivers/vfio/pci/pds/dirty.h
index a1f6d894f913..c8e23018b801 100644
--- a/drivers/vfio/pci/pds/dirty.h
+++ b/drivers/vfio/pci/pds/dirty.h
@@ -13,11 +13,13 @@ struct pds_vfio_region {
u64 page_size;
struct pds_lm_sg_elem *sgl;
dma_addr_t sgl_addr;
+ u32 dev_bmp_offset_start_byte;
u16 num_sge;
};
struct pds_vfio_dirty {
- struct pds_vfio_region region;
+ struct pds_vfio_region *regions;
+ u8 num_regions;
bool is_enabled;
};