arch/x86/kvm/debugfs.c
Source file repositories/reference/linux-study-clean/arch/x86/kvm/debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/kvm/debugfs.c- Extension
.c- Size
- 5009 bytes
- Lines
- 197
- Domain
- Architecture Layer
- Bucket
- arch/x86
- Inferred role
- Architecture Layer: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/kvm_host.hlinux/debugfs.hlapic.hmmu.hmmu/mmu_internal.h
Detected Declarations
function vcpu_get_timer_advance_nsfunction vcpu_get_guest_modefunction vcpu_get_tsc_offsetfunction vcpu_get_tsc_scaling_ratiofunction vcpu_get_tsc_scaling_frac_bitsfunction kvm_arch_create_vcpu_debugfsfunction kvm_mmu_rmaps_stat_showfunction kvm_mmu_rmaps_stat_openfunction kvm_mmu_rmaps_stat_releasefunction kvm_arch_create_vm_debugfs
Annotated Snippet
static const struct file_operations mmu_rmaps_stat_fops = {
.owner = THIS_MODULE,
.open = kvm_mmu_rmaps_stat_open,
.read = seq_read,
.llseek = seq_lseek,
.release = kvm_mmu_rmaps_stat_release,
};
void kvm_arch_create_vm_debugfs(struct kvm *kvm)
{
debugfs_create_file("mmu_rmaps_stat", 0644, kvm->debugfs_dentry, kvm,
&mmu_rmaps_stat_fops);
}
Annotation
- Immediate include surface: `linux/kvm_host.h`, `linux/debugfs.h`, `lapic.h`, `mmu.h`, `mmu/mmu_internal.h`.
- Detected declarations: `function vcpu_get_timer_advance_ns`, `function vcpu_get_guest_mode`, `function vcpu_get_tsc_offset`, `function vcpu_get_tsc_scaling_ratio`, `function vcpu_get_tsc_scaling_frac_bits`, `function kvm_arch_create_vcpu_debugfs`, `function kvm_mmu_rmaps_stat_show`, `function kvm_mmu_rmaps_stat_open`, `function kvm_mmu_rmaps_stat_release`, `function kvm_arch_create_vm_debugfs`.
- Atlas domain: Architecture Layer / arch/x86.
- Implementation status: pattern 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.