kvm_pgtable_hyp_unmap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so welcome to the kvm_pgtable_hyp_unmap(9) page in the Kernel API Manual, bestie! This one is all about kvm_pgtable_hyp_unmap β€” it removes a mapping from a hypervisor stage-1 page-table. that’s the whole assignment, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

here’s the signature, and we are copying it exactly because we do not freestyle C signatures in this house:

u64 kvm_pgtable_hyp_unmap (struct kvm_pgtable *pgt , u64 addr , u64 size
);

🌸 ARGUMENTS 🌸

  • pgt β€” the page-table structure initialised by kvm_pgtable_hyp_init. this is your main-character page-table ✨
  • addr β€” virtual address from which to remove the mapping. bye mapping, we hardly knew ye πŸ‘‹
  • size β€” size of the mapping. yes, the size. the amount. the whole vibe πŸ“

πŸ’œ DESCRIPTION πŸ’œ

so here’s the tea β˜•: the offset of addr within a page is ignored, size is rounded-up to the next page boundary, and phys is rounded-down to the previous page boundary. periodt.

TLB invalidation is performed for each page-table entry cleared during the unmapping operation, and the reference count for the page-table page containing the cleared entry is decremented β€” with unreferenced pages being freed. that cleanup is lowkey iconic 🧚

the unmapping operation will stop early if it encounters either an invalid page-table entry or a valid block mapping which maps beyond the range being unmapped. so if it hits either of those, it’s like β€œok bestie, I’m out” πŸ’€


πŸŽ€ RETURN πŸŽ€

Number of bytes unmapped, which may be 0. yes, zero is valid and it’s giving β€œnothing was unmapped, but make it fashion” πŸ™ˆ


🌈 SEE ALSO 🌈

Kernel file ./arch/arm64/include/asm/kvm_pgtable.h and the whole friend group:


✨ cute sign-off: source/version line is ./arch/arm64/include/asm, date is October 2026, and the page is kvm_pgtable_hyp_unmap(9). go slay those page tables, bestie β€” mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from