arch/riscv/kvm/main.c
Source file repositories/reference/linux-study-clean/arch/riscv/kvm/main.c
File Facts
- System
- Linux kernel
- Corpus path
arch/riscv/kvm/main.c- Extension
.c- Size
- 4050 bytes
- Lines
- 196
- Domain
- Architecture Layer
- Bucket
- arch/riscv
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/errno.hlinux/err.hlinux/module.hlinux/kvm_host.hasm/cpufeature.hasm/kvm_mmu.hasm/kvm_nacl.hasm/sbi.h
Detected Declarations
function kvm_riscv_setup_vendor_featuresfunction kvm_arch_dev_ioctlfunction kvm_arch_enable_virtualization_cpufunction kvm_arch_disable_virtualization_cpufunction kvm_riscv_teardownfunction riscv_kvm_initfunction riscv_kvm_exitmodule init riscv_kvm_init
Annotated Snippet
module_init(riscv_kvm_init);
static void __exit riscv_kvm_exit(void)
{
kvm_exit();
kvm_riscv_teardown();
}
module_exit(riscv_kvm_exit);
Annotation
- Immediate include surface: `linux/errno.h`, `linux/err.h`, `linux/module.h`, `linux/kvm_host.h`, `asm/cpufeature.h`, `asm/kvm_mmu.h`, `asm/kvm_nacl.h`, `asm/sbi.h`.
- Detected declarations: `function kvm_riscv_setup_vendor_features`, `function kvm_arch_dev_ioctl`, `function kvm_arch_enable_virtualization_cpu`, `function kvm_arch_disable_virtualization_cpu`, `function kvm_riscv_teardown`, `function riscv_kvm_init`, `function riscv_kvm_exit`, `module init riscv_kvm_init`.
- Atlas domain: Architecture Layer / arch/riscv.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.