arch/loongarch/kvm/main.c
Source file repositories/reference/linux-study-clean/arch/loongarch/kvm/main.c
File Facts
- System
- Linux kernel
- Corpus path
arch/loongarch/kvm/main.c- Extension
.c- Size
- 13265 bytes
- Lines
- 449
- Domain
- Architecture Layer
- Bucket
- arch/loongarch
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/err.hlinux/module.hlinux/kvm_host.hasm/cacheflush.hasm/cpufeature.hasm/kvm_csr.hasm/kvm_eiointc.hasm/kvm_pch_pic.htrace.h
Detected Declarations
function get_gcsr_flagfunction set_gcsr_sw_flagfunction set_gcsr_hw_flagfunction kvm_init_gcsr_flagfunction kvm_update_vpidfunction kvm_check_vpidfunction kvm_init_vmcsfunction kvm_arch_dev_ioctlfunction kvm_arch_enable_virtualization_cpufunction kvm_arch_disable_virtualization_cpufunction kvm_loongarch_env_initfunction for_each_possible_cpufunction kvm_loongarch_env_exitfunction kvm_loongarch_initfunction kvm_loongarch_exitmodule init kvm_loongarch_init
Annotated Snippet
module_init(kvm_loongarch_init);
module_exit(kvm_loongarch_exit);
#ifdef MODULE
static const struct cpu_feature kvm_feature[] = {
{ .feature = cpu_feature(LOONGARCH_LVZ) },
{},
};
MODULE_DEVICE_TABLE(cpu, kvm_feature);
#endif
Annotation
- Immediate include surface: `linux/err.h`, `linux/module.h`, `linux/kvm_host.h`, `asm/cacheflush.h`, `asm/cpufeature.h`, `asm/kvm_csr.h`, `asm/kvm_eiointc.h`, `asm/kvm_pch_pic.h`.
- Detected declarations: `function get_gcsr_flag`, `function set_gcsr_sw_flag`, `function set_gcsr_hw_flag`, `function kvm_init_gcsr_flag`, `function kvm_update_vpid`, `function kvm_check_vpid`, `function kvm_init_vmcs`, `function kvm_arch_dev_ioctl`, `function kvm_arch_enable_virtualization_cpu`, `function kvm_arch_disable_virtualization_cpu`.
- Atlas domain: Architecture Layer / arch/loongarch.
- Implementation status: integration 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.