kvm_arm_setup_mdcr_el2(9)
okay bestie, welcome to kvm_arm_setup_mdcr_el2(9) from the Kernel API Manual β this is the page where mdcr_el2 gets its whole setup moment, and honestly? iconic π
β¨ NAME β¨
kvm_arm_setup_mdcr_el2 β configure vcpu mdcr_el2 value π
That's exactly the NAME business: configure vcpu mdcr_el2 value. No cap.
π¦ SYNOPSIS π¦
void kvm_arm_setup_mdcr_el2 (struct kvm_vcpu *vcpu );
That's the whole signature, bestie: void, the function name, and a struct kvm_vcpu *vcpu pointer. Slay.
π ARGUMENTS π
vcpuβ the vcpu pointer. That's it, that's the argument, and she's literally the main character πΈ
π DESCRIPTION π
okay so this function is the vibe check for mdcr_el2. It ensures we will trap access to:
- Performance monitors (
MDCR_EL2_TPM/MDCR_EL2_TPMCR) π - Debug ROM Address (
MDCR_EL2_TDRA) π¦ - OS related registers (
MDCR_EL2_TDOSA) π - Statistical profiler (
MDCR_EL2_TPMS/MDCR_EL2_E2PB) β - Self-hosted Trace Filter controls (
MDCR_EL2_TTRF) π₯ - Self-hosted Trace (
MDCR_EL2_TTRF/MDCR_EL2_E2TB) π
The way that list is giving "trap access to all of these" is the whole point, fr fr. And yes, MDCR_EL2_TTRF shows up in two of the bullets β that's what the page says, so we keep it exactly like that, periodt π
π SEE ALSO π
Kernel file ./arch/arm64/kvm/debug.c β go peek, iykyk π
okay that's the tea and the footer energy: source/version ./arch/arm64/kvm, date October 2026, manual kvm_arm_setup_mdcr_el2(9) β bye bestie, mwah π«Άβ¨
π¦ 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