arch/mips/kvm/mips.c
Source file repositories/reference/linux-study-clean/arch/mips/kvm/mips.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/kvm/mips.c- Extension
.c- Size
- 40912 bytes
- Lines
- 1643
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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 user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/bitops.hlinux/errno.hlinux/err.hlinux/kdebug.hlinux/module.hlinux/uaccess.hlinux/vmalloc.hlinux/sched/signal.hlinux/fs.hlinux/memblock.hlinux/pgtable.hasm/fpu.hasm/page.hasm/cacheflush.hasm/mmu_context.hasm/pgalloc.hlinux/kvm_host.hinterrupt.htrace.h
Detected Declarations
function kvm_guest_mode_change_trace_regfunction kvm_guest_mode_change_trace_unregfunction kvm_arch_vcpu_runnablefunction kvm_arch_vcpu_in_kernelfunction kvm_arch_vcpu_should_kickfunction kvm_arch_enable_virtualization_cpufunction kvm_arch_disable_virtualization_cpufunction kvm_arch_init_vmfunction kvm_mips_free_gpa_ptfunction kvm_arch_destroy_vmfunction kvm_arch_dev_ioctlfunction kvm_arch_flush_shadow_allfunction kvm_arch_flush_shadow_memslotfunction kvm_arch_prepare_memory_regionfunction kvm_arch_commit_memory_regionfunction kvm_arch_flush_shadow_memslotfunction dump_handlerfunction kvm_mips_comparecount_wakeupfunction kvm_arch_vcpu_precreatefunction kvm_arch_vcpu_createfunction kvm_arch_vcpu_destroyfunction kvm_arch_vcpu_ioctl_set_guest_debugfunction kvm_mips_vcpu_enter_exitfunction kvm_arch_vcpu_ioctl_runfunction kvm_vcpu_ioctl_interruptfunction kvm_arch_vcpu_ioctl_get_mpstatefunction kvm_arch_vcpu_ioctl_set_mpstatefunction kvm_mips_num_regsfunction kvm_mips_copy_reg_indicesfunction kvm_mips_get_regfunction kvm_mips_set_regfunction kvm_vcpu_ioctl_enable_capfunction kvm_arch_vcpu_unlocked_ioctlfunction kvm_arch_vcpu_ioctlfunction kvm_arch_sync_dirty_logfunction kvm_arch_vm_ioctlfunction kvm_arch_vcpu_ioctl_get_sregsfunction kvm_arch_vcpu_ioctl_set_sregsfunction kvm_arch_vcpu_postcreatefunction kvm_arch_vcpu_ioctl_set_fpufunction kvm_arch_vcpu_faultfunction kvm_vm_ioctl_check_extensionfunction kvm_cpu_has_pending_timerfunction kvm_arch_vcpu_dump_regsfunction kvm_arch_vcpu_ioctl_set_regsfunction kvm_arch_vcpu_ioctl_get_regsfunction kvm_arch_vcpu_ioctl_translatefunction kvm_mips_set_c0_status
Annotated Snippet
module_init(kvm_mips_init);
module_exit(kvm_mips_exit);
EXPORT_TRACEPOINT_SYMBOL(kvm_exit);
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/errno.h`, `linux/err.h`, `linux/kdebug.h`, `linux/module.h`, `linux/uaccess.h`, `linux/vmalloc.h`, `linux/sched/signal.h`.
- Detected declarations: `function kvm_guest_mode_change_trace_reg`, `function kvm_guest_mode_change_trace_unreg`, `function kvm_arch_vcpu_runnable`, `function kvm_arch_vcpu_in_kernel`, `function kvm_arch_vcpu_should_kick`, `function kvm_arch_enable_virtualization_cpu`, `function kvm_arch_disable_virtualization_cpu`, `function kvm_arch_init_vm`, `function kvm_mips_free_gpa_pt`, `function kvm_arch_destroy_vm`.
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- 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.