Re: [PATCH v5 5/5] vfio: selftests: add end of address space DMA map/unmap tests

David Matlack
2025-10-27T23:45:34Z

On 2025-10-27 10:33 AM, Alex Mastro wrote:
> Add tests which validate dma map/unmap at the end of address space. Add
> negative test cases for checking that overflowing ioctl args fail with
> the expected errno.
>
> Signed-off-by: Alex Mastro <amastro@fb.com>

Reviewed-by: David Matlack <dmatlack@google.com>

> +FIXTURE_SETUP(vfio_dma_map_limit_test)
> +{
> + u64 region_size = getpagesize();

nit: Add a blank line after variable declarations.

> + /*
> + * Over-allocate mmap by double the size to provide enough backing vaddr
> + * for overflow tests
> + */
> + self->mmap_size = 2 * region_size;
> + struct vfio_dma_region *region = &self->region;

nit: Declare variables at the beginning of blocks.