_kvm_vz_save_htimer(9)
πΈ _kvm_vz_save_htimer(9) πΈ
okay so bestie, welcome to the Kernel API Manual β yes we're literally in the kernel section now, look at us go π
this one's about _kvm_vz_save_htimer, and it's giving "put the hardware timer down gently and let software take over" energy. no cap.
β¨ NAME β¨
_kvm_vz_save_htimer β switch to software emulation of the guest timer π°οΈβ¨
π SYNOPSIS π
void _kvm_vz_save_htimer (struct kvm_vcpu *vcpu , u32 *out_compare , u32
*out_cause );
likeβ¦ that's the whole signature. void return, three args, iconic π
π«Ά ARGUMENTS π«Ά
vcpuβ the virtual CPU in question π your main character, basically.out_compareβ a pointer, and you write the compare value into it π― that's its whole job.out_causeβ also a pointer, and the cause value goes in here π§ so it can be the cause ofβ¦ something. placing blame, honestly.
π¦ DESCRIPTION π¦
so what does it do, you ask? it saves the VZ guest timer state and switches over to software emulation of the guest CP0 timer π₯ literally handing the reins from hardware to software, and it does it flawlessly.
β οΈ but bestie listen β the hard timer must already be in use, which means preemption should be disabled. don't skip this part, fr fr, it's not a vibe check you wanna fail π
π SEE ALSO π
the kernel file lives at ./arch/mips/kvm/vz.c β go read it if you're feeling brave π«‘ and here's the whole friend group of related functions:
kvm_vz_should_use_htimer(9)_kvm_vz_restore_stimer(9)_kvm_vz_restore_htimer(9)kvm_vz_restore_timer(9)kvm_vz_acquire_htimer(9)kvm_vz_save_timer(9)kvm_vz_lose_htimer(9)is_eva_access(9)is_eva_am_mapped(9)kvm_vz_gva_to_gpa(9)kvm_vz_badvaddr_to_gpa(9)kvm_trap_vz_handle_cop_unusable(9)kvm_trap_vz_handle_msa_disabled(9)kvm_vz_resize_guest_vtlb(9)
all of them are right there in ./arch/mips/kvm, the whole squad β
and that's the page, bestie! brought to you by the fine folks in ./arch/mips/kvm, dated October 2026 β go forth and emulate timers responsibly ππβ¨
π¦ 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