Thread (110 messages) 110 messages, 10 authors, 2015-04-30

Re: [PATCH v1 02/47] x86: mtrr: generalize run time disabling of MTRR

From: Toshi Kani <hidden>
Date: 2015-03-27 20:58:37
Also in: lkml, xen-devel

On Fri, 2015-03-20 at 16:17 -0700, Luis R. Rodriguez wrote:
 :
quoted hunk ↗ jump to hunk
@@ -734,6 +742,7 @@ void __init mtrr_bp_init(void)
 	}
 
 	if (mtrr_if) {
+		mtrr_enabled = true;
 		set_num_var_ranges();
 		init_table();
 		if (use_intel()) {
                        get_mtrr_state();

After setting mtrr_enabled to true, get_mtrr_state() reads
MSR_MTRRdefType and sets 'mtrr_state.enabled', which also indicates if
MTRRs are enabled or not on the system.  So, potentially, we could have
a case that mtrr_enabled is set to true, but mtrr_state.enabled is set
to disabled when MTRRs are disabled by BIOS.

Thanks,
-Toshi

ps.
I recently cleaned up this part of the MTRR code in the patch below,
which is currently available in the -mm & -next trees.
https://lkml.org/lkml/2015/3/24/1063



Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help