kvm_gpc_init(9)
π kvm_gpc_init(9) π
okay so bestie, welcome to the Kernel API Manual β this one's about kvm_gpc_init, and yes it's a (9) page so it's living its best life in the kernel docs β¨
πΈ NAME πΈ
kvm_gpc_init β initialize gfn_to_pfn_cache.
π SYNOPSIS π
void kvm_gpc_init (struct gfn_to_pfn_cache *gpc , struct kvm *kvm );
like. that's the whole call. two args. slay.
π¦ ARGUMENTS π¦
gpcβ astruct gfn_to_pfn_cacheobject. this is the thing you're setting up, she's the main character πkvmβ pointer to thekvminstance. yep, that kvm π₯
π DESCRIPTION π
so what this does is it sets up a gfn_to_pfn_cache by initializing the locks and assigning the immutable attributes (the ones that never change, periodt β they get locked in at init and stay that way) π«Ά
β οΈ bestie listen, this part matters: the cache must be zero-allocated (or zeroed by the caller before init). not optional, not a vibe, just do it. no cap π
β SEE ALSO β
- Kernel file
./include/linux/kvm_host.h guest_state_enter_irqoff(9)guest_state_exit_irqoff(9)kvm_gpc_activate(9)kvm_gpc_activate_hva(9)kvm_gpc_check(9)kvm_gpc_refresh(9)kvm_gpc_deactivate(9)kvm_stats_linear_hist_update(9)kvm_stats_log_hist_update(9)
like a whole friend group of kernel functions tbh, go say hi π
okay that's the page!! this icon came from ./include/linux, dated October 2026 β mwah, love that for us ππ§ββοΈπ«
π¦ 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