mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 11:56:58 +00:00
Split out the contents of libvfio.h into separate header files, but keep libvfio.h as the top-level include that all tests can use. Put all new header files into a libvfio/ subdirectory to avoid future name conflicts in include paths when libvfio is used by other selftests like KVM. No functional change intended. Reviewed-by: Alex Mastro <amastro@fb.com> Tested-by: Alex Mastro <amastro@fb.com> Reviewed-by: Raghavendra Rao Ananta <rananta@google.com> Signed-off-by: David Matlack <dmatlack@google.com> Link: https://lore.kernel.org/r/20251126231733.3302983-17-dmatlack@google.com Signed-off-by: Alex Williamson <alex@shazbot.org>
27 lines
895 B
C
27 lines
895 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef SELFTESTS_VFIO_LIB_INCLUDE_LIBVFIO_H
|
|
#define SELFTESTS_VFIO_LIB_INCLUDE_LIBVFIO_H
|
|
|
|
#include <libvfio/assert.h>
|
|
#include <libvfio/iommu.h>
|
|
#include <libvfio/iova_allocator.h>
|
|
#include <libvfio/vfio_pci_device.h>
|
|
#include <libvfio/vfio_pci_driver.h>
|
|
|
|
/*
|
|
* Return the BDF string of the device that the test should use.
|
|
*
|
|
* If a BDF string is provided by the user on the command line (as the last
|
|
* element of argv[]), then this function will return that and decrement argc
|
|
* by 1.
|
|
*
|
|
* Otherwise this function will attempt to use the environment variable
|
|
* $VFIO_SELFTESTS_BDF.
|
|
*
|
|
* If BDF cannot be determined then the test will exit with KSFT_SKIP.
|
|
*/
|
|
const char *vfio_selftests_get_bdf(int *argc, char *argv[]);
|
|
char **vfio_selftests_get_bdfs(int *argc, char *argv[], int *nr_bdfs);
|
|
|
|
#endif /* SELFTESTS_VFIO_LIB_INCLUDE_LIBVFIO_H */
|