tools/testing/selftests/vfio/lib/include/libvfio.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/vfio/lib/include/libvfio.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/vfio/lib/include/libvfio.h- Extension
.h- Size
- 1186 bytes
- Lines
- 37
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
libvfio/assert.hlibvfio/iommu.hlibvfio/iova_allocator.hlibvfio/sysfs.hlibvfio/vfio_pci_device.hlibvfio/vfio_pci_driver.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#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/sysfs.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);
/*
* Reserve virtual address space of size at an address satisfying
* (vaddr % align) == offset.
*
* Returns the reserved vaddr. The caller is responsible for unmapping
* the returned region.
*/
void *mmap_reserve(size_t size, size_t align, size_t offset);
#endif /* SELFTESTS_VFIO_LIB_INCLUDE_LIBVFIO_H */
Annotation
- Immediate include surface: `libvfio/assert.h`, `libvfio/iommu.h`, `libvfio/iova_allocator.h`, `libvfio/sysfs.h`, `libvfio/vfio_pci_device.h`, `libvfio/vfio_pci_driver.h`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.