kvm_mips_migrate_count(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ kvm_mips_migrate_count(9) β€” the Kernel API Manual, MIPS KVM era ✨

Okay bestie, gather round, because we're reading a kernel API manual page together and honestly? It's kind of a bop. This one lives in the kvm_mips_migrate_count(9) corner of the Kernel API Manual universe, and it's all about making a timer follow its VCPU to a new CPU. Very main character relocation energy. πŸ’…


πŸ¦‹ NAME πŸ¦‹

kvm_mips_migrate_count β€” Migrate timer.

Like, that's it. That's the whole job description. The timer migrates. Iconic, minimal, no notes. ✨


πŸŽ€ SYNOPSIS πŸŽ€

void kvm_mips_migrate_count (struct kvm_vcpu *vcpu );

It returns void, so don't be out here expecting a little gift back. 🎁


🌸 ARGUMENTS 🌸

  • vcpu β€” Virtual CPU. Yeah, that's the whole explanation. It's the virtual CPU. The one and only. The one we're dragging over to a different CPU. 🫢

πŸ’– DESCRIPTION πŸ’–

So here's the tea, bestie: this function migrates the CP0_Count hrtimer to the current CPU by cancelling it and restarting it β€” but only if it was running prior to being cancelled. No cap, that's the whole move. Cancel, restart, if it was running. That's it. πŸ•βœ¨

And it must be called when the VCPU is migrated to a different CPU. Not "should", not "maybe if you feel like it" β€” must. Because the whole point is to ensure that timer expiry during guest execution actually interrupts the guest and causes the interrupt to be delivered in a timely manner. Like, if you skip this, the interrupt is just... late to the party. πŸ˜­πŸ™ˆ

⚠️ Heads up: this isn't optional decoration. If the VCPU moves CPUs and you don't call this, the timer expiry / interrupt delivery thing gets messy. Call it. Periodt. πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./arch/mips/kvm/mmu.c, plus the whole friend group:

Squad goals, honestly. πŸ‘‘


And that's the page, bestie β€” go touch grass (or, like, go read ./arch/mips/kvm) 🧚

Source/version vibes: this one's from the ./arch/mips/kvm directory, dated October 2026, and it's kvm_mips_migrate_count(9) all the way down. Mwah. πŸ’œπŸ’‹

πŸ“¦ where this page comes from