create_hyp_mappings(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… create_hyp_mappings(9) β€” the <pink>Kernel API Manual</pink> glow-up πŸŽ€

okay bestie, so this one's a <cyan>9</cyan>-section manpage from the Kernel API Manual, and it is literally about making Hyp mode see the exact same memory your kernel already sees. no cap, it's giving "copy my homework but change it just enough" energy πŸ’–


✨ NAME ✨

create_hyp_mappings β€” duplicate a kernel virtual address range in Hyp mode πŸ¦‹


🌸 SYNOPSIS 🌸

int create_hyp_mappings (void *from , void *to , enum kvm_pgtable_prot
prot );

like, that's the whole signature, keep the spacing, she's iconic πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • from β€” the virtual kernel start address of the range. like where the vibe begins ✨
  • to β€” the virtual kernel end address of the range, and it's exclusive bestie, so don't come for me when the last byte isn't included πŸ™ˆ
  • prot β€” the protection applied to this range. yes, she has boundaries πŸ’œ

🫢 DESCRIPTION 🫢

so the whole point: the same virtual address as the kernel virtual address is also used in the Hyp-mode mapping β€” modulo HYP_PAGE_OFFSET β€” and it points at the same underlying physical pages. no copies, no dupes, literally the same pages, just a second mapping living its best main-character life in Hyp mode 😭πŸ”₯

lowkey obsessed with how simple that is. same address vibe, shifted by HYP_PAGE_OFFSET, same physical pages underneath. periodt.

🌈 SEE ALSO 🌈

kernel file ./arch/arm64/kvm/mmu.c plus the whole friend group:

go read them, iykyk πŸ‘‘


kisses, this page came straight out of ./arch/arm64/kvm, dated <hotpink>October 2026</hotpink>, mwah πŸ’‹

πŸ“¦ where this page comes from