STRUCT X86_GUEST(9)
π NAME π
okay so welcome to the Kernel API Manual, bestie β this is the page for struct x86_guest(9), and it's literally the function-pointer squad used by misc guest incarnations like SEV, TDX, etc. It's giving "guest support crew, but make it kernel API" β¨
π¦ SYNOPSIS π¦
here's the whole struct, copied exactly β no edits, no vibes-based refactoring, periodt:
struct x86_guest {
int (*enc_status_change_prepare)(unsigned long vaddr, int npages,
bool enc);
int (*enc_status_change_finish)(unsigned long vaddr, int npages,
bool enc);
bool (*enc_tlb_flush_required)(bool enc);
bool (*enc_cache_flush_required)(void);
void (*enc_kexec_begin)(void);
void (*enc_kexec_finish)(void);
};
π«Ά Members π«Ά
okay these are the members, and yes they're all doing very specific little jobs π
enc_status_change_prepareβ notifies the HV before the encryption status of a range is changed. like a lil heads-up text before the group chat gets rearranged π¬enc_status_change_finishβ notifies the HV after the encryption status of a range is changed. the follow-up "we're done here" message β¨enc_tlb_flush_requiredβ returnstrueif a TLB flush is needed before changing page encryption status. lowkey crucial, no cap π¨enc_cache_flush_requiredβ returnstrueif a cache flush is needed before changing page encryption status. same vibe check, different flush π§Όenc_kexec_beginβ begins the two-step process of converting shared memory back to private. it stops the new conversions from being started and waits in-flight conversions to finish, if possible. literally "okay everyone pause, let the current messages send" π΅enc_kexec_finishβ finishes the two-step process of converting shared memory to private. all memory is private after the call when the function returns. it is called on only one CPU while the others are shut down and with interrupts disabled. main-character CPU energy, honestly π
π SEE ALSO π
peep these, bestie β the whole extended friend group:
- Kernel file
./arch/x86/include/asm/x86_init.h struct x86_init_mpparse(9)struct x86_init_resources(9)struct x86_init_irqs(9)struct x86_init_oem(9)struct x86_init_paging(9)struct x86_init_timers(9)struct x86_init_iommu(9)struct x86_init_pci(9)struct x86_hyper_init(9)struct x86_init_acpi(9)struct x86_init_ops(9)struct x86_cpuinit_ops(9)struct x86_legacy_devices(9)enum x86_legacy_i8042_state(9)struct x86_legacy_features(9)struct x86_hyper_runtime(9)struct x86_platform_ops(9)
byeee π β source/version: ./arch/x86/include/asm, date: October 2026, page: struct x86_guest(9).
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms