ENUM KVM_PGTABLE_PROT(9)
π 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
- 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