Commit 2e7c6feb authored by Brett Creeley's avatar Brett Creeley Committed by Alex Williamson

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: default avatarBrett Creeley <brett.creeley@amd.com>
Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
Link: https://lore.kernel.org/r/20231117001207.2793-7-brett.creeley@amd.comSigned-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 0c320f22
This diff is collapsed.
......@@ -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;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment