arch/riscv/include/asm/kvm_host.h
Source file repositories/reference/linux-study-clean/arch/riscv/include/asm/kvm_host.h
File Facts
- System
- Linux kernel
- Corpus path
arch/riscv/include/asm/kvm_host.h- Extension
.h- Size
- 8428 bytes
- Lines
- 326
- Domain
- Architecture Layer
- Bucket
- arch/riscv
- Inferred role
- Architecture Layer: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/kvm.hlinux/kvm_types.hlinux/spinlock.hasm/hwcap.hasm/kvm_aia.hasm/ptrace.hasm/kvm_tlb.hasm/kvm_vmid.hasm/kvm_vcpu_config.hasm/kvm_vcpu_fp.hasm/kvm_vcpu_insn.hasm/kvm_vcpu_sbi.hasm/kvm_vcpu_sbi_fwft.hasm/kvm_vcpu_timer.hasm/kvm_vcpu_pmu.h
Detected Declarations
struct kvm_vm_statstruct kvm_vcpu_statstruct kvm_arch_memory_slotstruct kvm_archstruct kvm_cpu_trapstruct kvm_cpu_contextstruct kvm_vcpu_csrstruct kvm_vcpu_smstateen_csrstruct kvm_vcpu_reset_statestruct kvm_vcpu_archfunction Interruptfunction kvm_arch_vcpu_blocking
Annotated Snippet
struct kvm_vm_stat {
struct kvm_vm_stat_generic generic;
};
struct kvm_vcpu_stat {
struct kvm_vcpu_stat_generic generic;
u64 ecall_exit_stat;
u64 wfi_exit_stat;
u64 wrs_exit_stat;
u64 mmio_exit_user;
u64 mmio_exit_kernel;
u64 csr_exit_user;
u64 csr_exit_kernel;
u64 signal_exits;
u64 exits;
u64 instr_illegal_exits;
u64 load_misaligned_exits;
u64 store_misaligned_exits;
u64 load_access_exits;
u64 store_access_exits;
};
struct kvm_arch_memory_slot {
};
struct kvm_arch {
/* G-stage vmid */
struct kvm_vmid vmid;
/* G-stage page table */
pgd_t *pgd;
phys_addr_t pgd_phys;
unsigned long pgd_levels;
/* Guest Timer */
struct kvm_guest_timer timer;
/* AIA Guest/VM context */
struct kvm_aia aia;
/* KVM_CAP_RISCV_MP_STATE_RESET */
bool mp_state_reset;
};
struct kvm_cpu_trap {
unsigned long sepc;
unsigned long scause;
unsigned long stval;
unsigned long htval;
unsigned long htinst;
};
struct kvm_cpu_context {
unsigned long zero;
unsigned long ra;
unsigned long sp;
unsigned long gp;
unsigned long tp;
unsigned long t0;
unsigned long t1;
unsigned long t2;
unsigned long s0;
unsigned long s1;
unsigned long a0;
unsigned long a1;
unsigned long a2;
unsigned long a3;
unsigned long a4;
unsigned long a5;
unsigned long a6;
unsigned long a7;
unsigned long s2;
unsigned long s3;
unsigned long s4;
unsigned long s5;
unsigned long s6;
unsigned long s7;
unsigned long s8;
unsigned long s9;
unsigned long s10;
unsigned long s11;
unsigned long t3;
unsigned long t4;
unsigned long t5;
unsigned long t6;
unsigned long sepc;
unsigned long sstatus;
unsigned long hstatus;
union __riscv_fp_state fp;
struct __riscv_v_ext_state vector;
Annotation
- Immediate include surface: `linux/types.h`, `linux/kvm.h`, `linux/kvm_types.h`, `linux/spinlock.h`, `asm/hwcap.h`, `asm/kvm_aia.h`, `asm/ptrace.h`, `asm/kvm_tlb.h`.
- Detected declarations: `struct kvm_vm_stat`, `struct kvm_vcpu_stat`, `struct kvm_arch_memory_slot`, `struct kvm_arch`, `struct kvm_cpu_trap`, `struct kvm_cpu_context`, `struct kvm_vcpu_csr`, `struct kvm_vcpu_smstateen_csr`, `struct kvm_vcpu_reset_state`, `struct kvm_vcpu_arch`.
- Atlas domain: Architecture Layer / arch/riscv.
- Implementation status: source implementation candidate.
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.