drivers/vfio/cdx/private.h
Source file repositories/reference/linux-study-clean/drivers/vfio/cdx/private.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/vfio/cdx/private.h- Extension
.h- Size
- 1304 bytes
- Lines
- 65
- Domain
- Driver Families
- Bucket
- drivers/vfio
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mutex.h
Detected Declarations
struct vfio_cdx_irqstruct vfio_cdx_regionstruct vfio_cdx_devicefunction Copyrightfunction vfio_cdx_set_irqs_ioctlfunction vfio_cdx_irqs_cleanup
Annotated Snippet
struct vfio_cdx_irq {
u32 flags;
u32 count;
int irq_no;
struct eventfd_ctx *trigger;
char *name;
};
struct vfio_cdx_region {
u32 flags;
u32 type;
u64 addr;
resource_size_t size;
};
struct vfio_cdx_device {
struct vfio_device vdev;
struct vfio_cdx_region *regions;
struct mutex cdx_irqs_lock;
struct vfio_cdx_irq *cdx_irqs;
u32 flags;
#define BME_SUPPORT BIT(0)
u32 msi_count;
};
#ifdef CONFIG_GENERIC_MSI_IRQ
int vfio_cdx_set_irqs_ioctl(struct vfio_cdx_device *vdev,
u32 flags, unsigned int index,
unsigned int start, unsigned int count,
void *data);
void vfio_cdx_irqs_cleanup(struct vfio_cdx_device *vdev);
#else
static int vfio_cdx_set_irqs_ioctl(struct vfio_cdx_device *vdev,
u32 flags, unsigned int index,
unsigned int start, unsigned int count,
void *data)
{
return -EINVAL;
}
static void vfio_cdx_irqs_cleanup(struct vfio_cdx_device *vdev)
{
}
#endif
#endif /* VFIO_CDX_PRIVATE_H */
Annotation
- Immediate include surface: `linux/mutex.h`.
- Detected declarations: `struct vfio_cdx_irq`, `struct vfio_cdx_region`, `struct vfio_cdx_device`, `function Copyright`, `function vfio_cdx_set_irqs_ioctl`, `function vfio_cdx_irqs_cleanup`.
- Atlas domain: Driver Families / drivers/vfio.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.