guest_force_mtrr_state(9)
okay so bestie, this is the guest_force_mtrr_state(9) page from the Kernel API Manual β¨ itβs literally all about setting static MTRR state for a guest, and it has major βyou get one shotβ energy π
π NAME π
guest_force_mtrr_state β set static MTRR state for a guest π thatβs the whole vibe. no cap.
πΈ SYNOPSIS πΈ
void guest_force_mtrr_state (struct mtrr_var_range *var , unsigned int
num_var , mtrr_type def_type );
π¦ ARGUMENTS π¦
varβ the MTRR variable range array to use πnum_varβ length of thevararraydef_typeβ default caching type
β¨ DESCRIPTION β¨
so guest_force_mtrr_state is how you set MTRR state via different means β e.g. with data obtained from a hypervisor π§ it is allowed only for special cases when youβre running virtualized.
it must be called from the x86_init.hyper.init_platform hook. not a suggestion, bestie β thatβs the rule π«Ά
π one call only! this function can be called only once, and the MTRR state canβt be changed afterwards. to ensure that stays true, X86_FEATURE_MTRR is cleared π
π₯ SEE ALSO π₯
- kernel file
./arch/x86/kernel/cpu/mtrr/generic.c mtrr_type_lookup(9)set_fixed_range(9)generic_get_free_region(9)set_fixed_ranges(9)set_mtrr_state(9)generic_set_mtrr(9)
okay thatβs the whole page, bestie! source/version: ./arch/x86/kernel/cpu/mtrr; date: October 2026; page: guest_force_mtrr_state(9) β slay and stay iconic π
β¨ππ
π¦ 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