drivers/iommu/iommufd/iommufd_test.h
Source file repositories/reference/linux-study-clean/drivers/iommu/iommufd/iommufd_test.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/iommu/iommufd/iommufd_test.h- Extension
.h- Size
- 6710 bytes
- Lines
- 294
- Domain
- Driver Families
- Bucket
- drivers/iommu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/iommufd.hlinux/types.h
Detected Declarations
struct iommu_test_cmdstruct iommu_test_hw_infostruct iommu_hwpt_selfteststruct iommu_hwpt_invalidate_selfteststruct iommu_viommu_selfteststruct iommu_viommu_invalidate_selfteststruct iommu_viommu_event_selftest
Annotated Snippet
struct iommu_test_cmd {
__u32 size;
__u32 op;
__u32 id;
__u32 __reserved;
union {
struct {
__aligned_u64 start;
__aligned_u64 length;
} add_reserved;
struct {
__u32 out_stdev_id;
__u32 out_hwpt_id;
/* out_idev_id is the standard iommufd_bind object */
__u32 out_idev_id;
} mock_domain;
struct {
__u32 out_stdev_id;
__u32 out_hwpt_id;
__u32 out_idev_id;
/* Expand mock_domain to set mock device flags */
__u32 dev_flags;
} mock_domain_flags;
struct {
__u32 pt_id;
} mock_domain_replace;
struct {
__aligned_u64 iova;
__aligned_u64 length;
__aligned_u64 uptr;
} check_map;
struct {
__aligned_u64 length;
__aligned_u64 uptr;
__u32 refs;
} check_refs;
struct {
__u32 out_access_fd;
__u32 flags;
} create_access;
struct {
__u32 access_pages_id;
} destroy_access_pages;
struct {
__u32 flags;
__u32 out_access_pages_id;
__aligned_u64 iova;
__aligned_u64 length;
__aligned_u64 uptr;
} access_pages;
struct {
__aligned_u64 iova;
__aligned_u64 length;
__aligned_u64 uptr;
__u32 flags;
} access_rw;
struct {
__u32 limit;
} memory_limit;
struct {
__u32 ioas_id;
} access_replace_ioas;
struct {
__u32 flags;
__aligned_u64 iova;
__aligned_u64 length;
__aligned_u64 page_size;
__aligned_u64 uptr;
__aligned_u64 out_nr_dirty;
} dirty;
struct {
__u32 id;
__u32 iotlb;
} check_iotlb;
struct {
__u32 dev_id;
__u32 pasid;
__u32 grpid;
__u32 perm;
__u64 addr;
} trigger_iopf;
struct {
__u32 id;
__u32 cache;
} check_dev_cache;
struct {
__u32 dev_id;
} trigger_vevent;
struct {
__u32 pasid;
Annotation
- Immediate include surface: `linux/iommufd.h`, `linux/types.h`.
- Detected declarations: `struct iommu_test_cmd`, `struct iommu_test_hw_info`, `struct iommu_hwpt_selftest`, `struct iommu_hwpt_invalidate_selftest`, `struct iommu_viommu_selftest`, `struct iommu_viommu_invalidate_selftest`, `struct iommu_viommu_event_selftest`.
- Atlas domain: Driver Families / drivers/iommu.
- 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.