kvm_get_vtcr(9)
β¨ NAME β¨
okay so bestie, this is kvm_get_vtcr(9) from the Kernel API Manual, and it's literally just a helper to construct VTCR_EL2. that's the whole vibe. π
πΈ SYNOPSIS πΈ
u64 kvm_get_vtcr (u64 mmfr0 , u64 mmfr1 , u32 phys_shift );
(yes the spacing is like that, i copied it exactly, do not come for me π )
π ARGUMENTS π
mmfr0β the sanitized value of theSYS_ID_AA64MMFR0_EL1register. sanitized, bestie, so it's already been through the wash π§Όmmfr1β the sanitized value of theSYS_ID_AA64MMFR1_EL1register. same energy, different register β¨phys_shiftβ the manpage literally says-- undescribed --so that's all we got π no cap, the docs left this one on read π
π¦ DESCRIPTION π¦
so the VTCR value is common across all the physical CPUs on the system. like, every single one. main character energy for a single value, honestly π
we use system wide sanitised values to fill in the different fields β except for Hardware Management of Access Flags.
and here's the spicy part π₯ the HA Flag is set unconditionally on all CPUs. why? because it is safe to run with or without the feature, and the bit is RES0 on CPUs that don't support it. so it's giving "set it and forget it", and that's iconic. periodt. π
β RETURN β
the VTCR_EL2 value. that's it, that's the return. slay π«Ά
π SEE ALSO π
the kernel file ./arch/arm64/include/asm/kvm_pgtable.h is the neighborhood, and here's the whole friend group you should go meet:
struct kvm_pgtable_mm_ops(9)enum kvm_pgtable_stage2_flags(9)enum kvm_pgtable_prot(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_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 a whole friend group, go say hi ππ
π and that's the page!! source/version is ./arch/arm64/include/asm, dated October 2026, and it's all about kvm_get_vtcr(9) β mwah, go read the rest of the kernel docs bestie, 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