kvm_arch_mm...ty_pt_masked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… kvm_arch_mmu_enable_log_dirty_pt_masked(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” this is the page for kvm_arch_mmu_enable_log_dirty_pt_masked, which is a whole mouthful but like, it's fine, we'll get through it together 🫢


✨ NAME ✨

kvm_arch_mmu_enable_log_dirty_pt_masked β€” write protect dirty pages

like literally, that's the whole job. write protect. dirty pages. slay πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

void kvm_arch_mmu_enable_log_dirty_pt_masked (struct kvm *kvm , struct
kvm_memory_slot *slot , gfn_t gfn_offset , unsigned long mask );

not me copy-pasting this exactly because it has to be exact, no cap. four arguments, returns void, that's the vibe check and it passed βœ…


πŸŽ€ ARGUMENTS πŸŽ€

  • kvm β€” the KVM pointer. it's THE pointer. main character energy honestly πŸ‘‘
  • slot β€” the memory slot that's associated with mask. they're a package deal, iykyk πŸ’–
  • gfn_offset β€” the gfn offset in the memory slot. just an offset, living its life 🌸
  • mask β€” the mask of dirty pages at offset gfn_offset in this memory slot that are gonna get write protected. this is the star of the show fr fr ⭐

πŸ”₯ DESCRIPTION πŸ”₯

so the way this works is: it walks the bits that are set in mask, and write protects the associated pte's. that's it. that's the function. iconic behavior honestly πŸ’€

⚠️ okay bestie listen, this part matters: the caller must acquire kvm->mmu_lock. like, you. you have to do it. it's not doing it for you. don't come crying to me if you skip it πŸ˜­πŸ”’

🌈 SEE ALSO 🌈

the kernel file is ./arch/mips/kvm/mmu.c β€” that's where the magic lives 🧚

and here's the whole friend group, all of them cross-referenced and accounted for, not a single one skipped:

go read them. or don't. but they're there πŸ¦‹


πŸ’Œ and that's the page!! sourced from ./arch/mips/kvm, dated October 2026, filed under that same kvm_arch_mmu_enable_log_dirty_pt_masked(9) header we started with. mwah, go write protect some pages responsibly, ily πŸ“πŸ’œ
πŸ“¦ where this page comes from