ENUM KVM_PGTABLE_PROT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… enum kvm_pgtable_prot β€” the kernel API manual, bestie edition ✨

Okay so you're in the Kernel API Manual and the page is literally called enum kvm_pgtable_prot, and honestly? It's giving permission-slip realness. This is the enum that tells KVM's page-table code what a page is allowed to do and what kind of memory it is. No cap, every bit here matters. πŸŽ€


🌸 NAME 🌸

enum kvm_pgtable_prot β€” Page-table permissions and attributes. That's it, that's the whole vibe. Permissions AND attributes, bestie, both. πŸ¦‹


✨ SYNOPSIS ✨

enum kvm_pgtable_prot {
    KVM_PGTABLE_PROT_PX ,
    KVM_PGTABLE_PROT_UX ,
    KVM_PGTABLE_PROT_X ,
    KVM_PGTABLE_PROT_W ,
    KVM_PGTABLE_PROT_R ,
    KVM_PGTABLE_PROT_DEVICE ,
    KVM_PGTABLE_PROT_NORMAL_NC ,
    KVM_PGTABLE_PROT_SW0 ,
    KVM_PGTABLE_PROT_SW1 ,
    KVM_PGTABLE_PROT_SW2 ,
    KVM_PGTABLE_PROT_SW3

};

Look at that list. Eleven constants. Every single one is a mood, and every single one gets its own moment below. πŸ‘‘


🧚 Constants 🧚

  • KVM_PGTABLE_PROT_PX β€” Privileged execute permission. So like, the privileged side can execute. Iconic. πŸ”₯
  • KVM_PGTABLE_PROT_UX β€” Unprivileged execute permission. Same energy, but for the unprivileged girlies. πŸ’…
  • KVM_PGTABLE_PROT_X β€” Privileged and unprivileged execute permission. Everybody gets to execute. Generous queen behavior. πŸ‘‘
  • KVM_PGTABLE_PROT_W β€” Write permission. Go ahead, write to it, slay. ✍️
  • KVM_PGTABLE_PROT_R β€” Read permission. The bare minimum, but we respect it. πŸ’–
  • KVM_PGTABLE_PROT_DEVICE β€” Device attributes. It's giving "this memory is a device, don't treat it like normal RAM." 🫢
  • KVM_PGTABLE_PROT_NORMAL_NC β€” Normal noncacheable attributes. Normal-ish but noncacheable, which is a whole personality. πŸ¦‹
  • KVM_PGTABLE_PROT_SW0 β€” Software bit 0. Reserved for the software squad, not the hardware. πŸŽ€
  • KVM_PGTABLE_PROT_SW1 β€” Software bit 1. Second verse, same as the first. ✨
  • KVM_PGTABLE_PROT_SW2 β€” Software bit 2. Still going. πŸ’œ
  • KVM_PGTABLE_PROT_SW3 β€” Software bit 3. And that's the last software bit, periodt. 🌸

πŸ” SEE ALSO πŸ”

Kernel file ./arch/arm64/include/asm/kvm_pgtable.h and honestly the whole friend group: struct kvm_pgtable_mm_ops(9), enum kvm_pgtable_stage2_flags(9), enum kvm_pgtable_walk_flags(9), struct kvm_pgtable_walker(9), struct kvm_pgtable(9), kvm_pgtable_hyp_init(9), kvm_pgtable_hyp_destroy(9), kvm_pgtable_hyp_map(9), kvm_pgtable_hyp_unmap(9), kvm_get_vtcr(9), kvm_pgtable_stage2_pgd_size(9), __kvm_pgtable_stage2_init(9), kvm_pgtable_stage2_destroy(9), kvm_pgtable_stage2_destroy_range(9), kvm_pgtable_stage2_destroy_pgd(9), kvm_pgtable_stage2_free_unlinked(9), kvm_pgtable_stage2_create_unlinked(9), kvm_pgtable_stage2_map(9), kvm_pgtable_stage2_annotate(9), kvm_pgtable_stage2_unmap(9), kvm_pgtable_stage2_wrprotect(9), kvm_pgtable_stage2_mkyoung(9), kvm_pgtable_stage2_test_clear_young(9), kvm_pgtable_stage2_relax_perms(9), kvm_pgtable_stage2_split(9), kvm_pgtable_walk(9), kvm_pgtable_get_leaf(9), kvm_pgtable_stage2_pte_prot(9), kvm_pgtable_hyp_pte_prot(9), kvm_tlb_flush_vmid_range(9).

Like, that's the entire group chat. Add them all, bestie, we don't leave anyone out. 🫢


⚠️ Quick heads-up: the source lives at ./arch/arm64/include/asm, so this is arm64-flavored, iykyk. 🧚

Mwah πŸ’‹ β€” that's the whole page, written down for the Kernel API Manual, dated October 2026, filed under ./arch/arm64/include/asm. Go forth and map those pages, bestie. πŸ’œβœ¨

πŸ“¦ where this page comes from