arch/x86/boot/compressed/sev.c
Source file repositories/reference/linux-study-clean/arch/x86/boot/compressed/sev.c
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/boot/compressed/sev.c- Extension
.c- Size
- 13182 bytes
- Lines
- 514
- Domain
- Architecture Layer
- Bucket
- arch/x86
- 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
misc.hasm/bootparam.hasm/pgtable_types.hasm/shared/msr.hasm/sev.hasm/trapnr.hasm/trap_pf.hasm/msr-index.hasm/fpu/xcr.hasm/ptrace.hasm/svm.hasm/cpuid/api.herror.hsev.h../../boot/startup/sev-shared.c
Detected Declarations
function sev_snp_enabledfunction snp_set_page_privatefunction snp_set_page_sharedfunction early_setup_ghcbfunction snp_accept_memoryfunction sev_es_shutdown_ghcbfunction sev_es_ghcb_terminatefunction sev_es_check_ghcb_faultfunction snp_get_unsupported_featuresfunction snp_check_featuresfunction early_snp_initfunction sev_check_cpu_supportfunction sev_enablefunction sev_get_statusfunction sev_prep_identity_mapsfunction early_is_sevsnp_guest
Annotated Snippet
if (eax & BIT(28)) {
struct msr m;
/* Obtain the address of the calling area to use */
raw_rdmsr(MSR_SVSM_CAA, &m);
boot_svsm_caa_pa = m.q;
/*
* The real VMPL level cannot be discovered, but the
* memory acceptance routines make no use of that so
* any non-zero value suffices here.
*/
snp_vmpl = U8_MAX;
}
}
return true;
}
Annotation
- Immediate include surface: `misc.h`, `asm/bootparam.h`, `asm/pgtable_types.h`, `asm/shared/msr.h`, `asm/sev.h`, `asm/trapnr.h`, `asm/trap_pf.h`, `asm/msr-index.h`.
- Detected declarations: `function sev_snp_enabled`, `function snp_set_page_private`, `function snp_set_page_shared`, `function early_setup_ghcb`, `function snp_accept_memory`, `function sev_es_shutdown_ghcb`, `function sev_es_ghcb_terminate`, `function sev_es_check_ghcb_fault`, `function snp_get_unsupported_features`, `function snp_check_features`.
- Atlas domain: Architecture Layer / arch/x86.
- 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.