Files
erofs-linux/tools/testing/selftests/vfio/lib/include
Raghavendra Rao Ananta 3152e7f457 vfio: selftests: Add helpers to alloc/free vfio_pci_device
Add a helper, vfio_pci_device_alloc(), to allocate 'struct
vfio_pci_device'. The subsequent test patch will utilize this
to get the struct with very minimal initialization done.
Internally, let vfio_pci_device_init() also make use of this
function and later do the full initialization.

Symmetrically, add a free variant, vfio_pci_device_free(),
to be used in a similar fashion.

No functional change intended.

Signed-off-by: Raghavendra Rao Ananta <[email protected]>
Reviewed-by: David Matlack <[email protected]>
Reviewed-by: Vipin Sharma <[email protected]>
Tested-by: David Matlack <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
2026-05-20 11:54:10 -06:00
..