kvm_arch_mm...ty_pt_masked(9)
π 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 withmask. 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 offsetgfn_offsetin 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:
kvm_pgd_init(9)kvm_pgd_alloc(9)kvm_mips_walk_pgd(9)kvm_mips_flush_gpa_pt(9)kvm_mips_mkclean_gpa_pt(9)_kvm_mips_map_page_fast(9)kvm_mips_map_page(9)kvm_mips_migrate_count(9)
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 samekvm_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
- 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