drivers/s390/cio/vfio_ccw_private.h
Source file repositories/reference/linux-study-clean/drivers/s390/cio/vfio_ccw_private.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/cio/vfio_ccw_private.h- Extension
.h- Size
- 5878 bytes
- Lines
- 201
- Domain
- Driver Families
- Bucket
- drivers/s390
- 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/completion.hlinux/eventfd.hlinux/workqueue.hlinux/vfio_ccw.hlinux/vfio.hlinux/mdev.hasm/crw.hasm/debug.hcss.hvfio_ccw_cp.h
Detected Declarations
struct vfio_ccw_privatestruct vfio_ccw_regionstruct vfio_ccw_regopsstruct vfio_ccw_regionstruct vfio_ccw_crwstruct vfio_ccw_parentstruct vfio_ccw_privateenum vfio_ccw_stateenum vfio_ccw_eventfunction vfio_ccw_fsm_eventfunction debug_text_event
Annotated Snippet
struct vfio_ccw_regops {
ssize_t (*read)(struct vfio_ccw_private *private, char __user *buf,
size_t count, loff_t *ppos);
ssize_t (*write)(struct vfio_ccw_private *private,
const char __user *buf, size_t count, loff_t *ppos);
void (*release)(struct vfio_ccw_private *private,
struct vfio_ccw_region *region);
};
struct vfio_ccw_region {
u32 type;
u32 subtype;
const struct vfio_ccw_regops *ops;
void *data;
size_t size;
u32 flags;
};
int vfio_ccw_register_dev_region(struct vfio_ccw_private *private,
unsigned int subtype,
const struct vfio_ccw_regops *ops,
size_t size, u32 flags, void *data);
void vfio_ccw_unregister_dev_regions(struct vfio_ccw_private *private);
int vfio_ccw_register_async_dev_regions(struct vfio_ccw_private *private);
int vfio_ccw_register_schib_dev_regions(struct vfio_ccw_private *private);
int vfio_ccw_register_crw_dev_regions(struct vfio_ccw_private *private);
struct vfio_ccw_crw {
struct list_head next;
struct crw crw;
};
/**
* struct vfio_ccw_parent
*
* @dev: embedded device struct
* @parent: parent data structures for mdevs created
* @mdev_type(s): identifying information for mdevs created
*/
struct vfio_ccw_parent {
struct device dev;
struct mdev_parent parent;
struct mdev_type mdev_type;
struct mdev_type *mdev_types;
};
/**
* struct vfio_ccw_private
* @vdev: Embedded VFIO device
* @state: internal state of the device
* @completion: synchronization helper of the I/O completion
* @io_region: MMIO region to input/output I/O arguments/results
* @io_mutex: protect against concurrent update of I/O regions
* @region: additional regions for other subchannel operations
* @cmd_region: MMIO region for asynchronous I/O commands other than START
* @schib_region: MMIO region for SCHIB information
* @crw_region: MMIO region for getting channel report words
* @num_regions: number of additional regions
* @cp: channel program for the current I/O operation
* @irb: irb info received from interrupt
* @scsw: scsw info
* @io_trigger: eventfd ctx for signaling userspace I/O results
* @crw_trigger: eventfd ctx for signaling userspace CRW information
* @req_trigger: eventfd ctx for signaling userspace to return device
* @io_work: work for deferral process of I/O handling
* @crw_work: work for deferral process of CRW handling
*/
struct vfio_ccw_private {
struct vfio_device vdev;
int state;
struct completion *completion;
struct ccw_io_region *io_region;
struct mutex io_mutex;
struct vfio_ccw_region *region;
struct ccw_cmd_region *cmd_region;
struct ccw_schib_region *schib_region;
struct ccw_crw_region *crw_region;
int num_regions;
struct channel_program cp;
struct irb irb;
union scsw scsw;
struct list_head crw;
struct eventfd_ctx *io_trigger;
struct eventfd_ctx *crw_trigger;
struct eventfd_ctx *req_trigger;
struct work_struct io_work;
Annotation
- Immediate include surface: `linux/completion.h`, `linux/eventfd.h`, `linux/workqueue.h`, `linux/vfio_ccw.h`, `linux/vfio.h`, `linux/mdev.h`, `asm/crw.h`, `asm/debug.h`.
- Detected declarations: `struct vfio_ccw_private`, `struct vfio_ccw_region`, `struct vfio_ccw_regops`, `struct vfio_ccw_region`, `struct vfio_ccw_crw`, `struct vfio_ccw_parent`, `struct vfio_ccw_private`, `enum vfio_ccw_state`, `enum vfio_ccw_event`, `function vfio_ccw_fsm_event`.
- Atlas domain: Driver Families / drivers/s390.
- 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.