drivers/s390/char/uvdevice.c
Source file repositories/reference/linux-study-clean/drivers/s390/char/uvdevice.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/char/uvdevice.c- Extension
.c- Size
- 16921 bytes
- Lines
- 571
- Domain
- Driver Families
- Bucket
- drivers/s390
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/kernel.hlinux/miscdevice.hlinux/types.hlinux/stddef.hlinux/vmalloc.hlinux/slab.hlinux/cpufeature.hasm/uvdevice.hasm/uv.h
Detected Declarations
function set_supp_uv_cmdsfunction uvio_uvdev_infofunction uvio_build_uvcb_attestfunction uvio_copy_attest_result_to_userfunction get_uvio_attestfunction uvio_attestationfunction uvio_add_secretfunction uvio_get_listfunction uvio_list_secretsfunction uvio_lock_secretsfunction uvio_retr_secretfunction uvio_copy_and_check_ioctlfunction uvio_ioctlfunction uvio_dev_exitfunction uvio_dev_init
Annotated Snippet
static const struct file_operations uvio_dev_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = uvio_ioctl,
};
static struct miscdevice uvio_dev_miscdev = {
.minor = MISC_DYNAMIC_MINOR,
.name = UVIO_DEVICE_NAME,
.fops = &uvio_dev_fops,
};
static void __exit uvio_dev_exit(void)
{
misc_deregister(&uvio_dev_miscdev);
}
static int __init uvio_dev_init(void)
{
set_supp_uv_cmds((unsigned long *)&uvdev_info.supp_uv_cmds);
return misc_register(&uvio_dev_miscdev);
}
module_cpu_feature_match(S390_CPU_FEATURE_UV, uvio_dev_init);
module_exit(uvio_dev_exit);
MODULE_AUTHOR("IBM Corporation");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Ultravisor UAPI driver");
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/miscdevice.h`, `linux/types.h`, `linux/stddef.h`, `linux/vmalloc.h`, `linux/slab.h`, `linux/cpufeature.h`.
- Detected declarations: `function set_supp_uv_cmds`, `function uvio_uvdev_info`, `function uvio_build_uvcb_attest`, `function uvio_copy_attest_result_to_user`, `function get_uvio_attest`, `function uvio_attestation`, `function uvio_add_secret`, `function uvio_get_list`, `function uvio_list_secrets`, `function uvio_lock_secrets`.
- Atlas domain: Driver Families / drivers/s390.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
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.