include/kvm/iodev.h
Source file repositories/reference/linux-study-clean/include/kvm/iodev.h
File Facts
- System
- Linux kernel
- Corpus path
include/kvm/iodev.h- Extension
.h- Size
- 1384 bytes
- Lines
- 59
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kvm_types.hlinux/errno.h
Detected Declarations
struct kvm_io_devicestruct kvm_vcpustruct kvm_io_device_opsstruct kvm_io_devicefunction kvm_iodevice_initfunction kvm_iodevice_readfunction kvm_iodevice_write
Annotated Snippet
struct kvm_io_device_ops {
int (*read)(struct kvm_vcpu *vcpu,
struct kvm_io_device *this,
gpa_t addr,
int len,
void *val);
int (*write)(struct kvm_vcpu *vcpu,
struct kvm_io_device *this,
gpa_t addr,
int len,
const void *val);
void (*destructor)(struct kvm_io_device *this);
};
struct kvm_io_device {
const struct kvm_io_device_ops *ops;
};
static inline void kvm_iodevice_init(struct kvm_io_device *dev,
const struct kvm_io_device_ops *ops)
{
dev->ops = ops;
}
static inline int kvm_iodevice_read(struct kvm_vcpu *vcpu,
struct kvm_io_device *dev, gpa_t addr,
int l, void *v)
{
return dev->ops->read ? dev->ops->read(vcpu, dev, addr, l, v)
: -EOPNOTSUPP;
}
static inline int kvm_iodevice_write(struct kvm_vcpu *vcpu,
struct kvm_io_device *dev, gpa_t addr,
int l, const void *v)
{
return dev->ops->write ? dev->ops->write(vcpu, dev, addr, l, v)
: -EOPNOTSUPP;
}
#endif /* __KVM_IODEV_H__ */
Annotation
- Immediate include surface: `linux/kvm_types.h`, `linux/errno.h`.
- Detected declarations: `struct kvm_io_device`, `struct kvm_vcpu`, `struct kvm_io_device_ops`, `struct kvm_io_device`, `function kvm_iodevice_init`, `function kvm_iodevice_read`, `function kvm_iodevice_write`.
- Atlas domain: Repository Root And Misc / include.
- 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.