kvm_get_vtcr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 the SYS_ID_AA64MMFR0_EL1 register. sanitized, bestie, so it's already been through the wash 🧼
  • mmfr1 β€” the sanitized value of the SYS_ID_AA64MMFR1_EL1 register. 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:

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