public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* x86: Extend mtrr lookup to support regions spanning MTRR range
@ 2010-09-11  1:15 Venkatesh Pallipadi
  2010-09-11  1:15 ` [PATCH 1/2] x86: refactor MTRR type overlap check code Venkatesh Pallipadi
  2010-09-11  1:15 ` [PATCH 2/2] x86: Support mtrr lookup for range spanning across MTRR range Venkatesh Pallipadi
  0 siblings, 2 replies; 3+ messages in thread
From: Venkatesh Pallipadi @ 2010-09-11  1:15 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, Yinghai Lu
  Cc: Suresh Siddha, Mark Langsdorf, linux-kernel, Venkatesh Pallipadi

mtrr_type_lookup [start:end] looked up the resultant MTRR type for that
range, based on fixed and all variable MTRR ranges. It did check for multiple
MTRR var ranges overlapping [start:end] and returned the net type.

However, if the [start:end] range spanned across any var MTRR range,
mtrr_type_lookup would return an error return of 0xFE. This was based on
typical usage of mtrr_type_lookup in PAT mapping, where region being
mapped would not normally span across MTRR ranges and also trying
to keep the code simple.

Mark recently reported the problem with this limitation. When there are
two continguous MTRR's of type "writeback" and if there is a memory mapping
over a region starting in one MTRR range and ending in another MTRR range,
such mapping will fallback to "uncached" due to the above limitation.

Change below adds support for such lookups spanning multiple MTRR ranges.
We now have a wrapper mtrr_type_lookup that dynamically splits such a region
into smaller chunks that fit within one MTRR range and does a
__mtrr_type_lookup on it and combine the results later.

Reported-by: Mark Langsdorf <mark.langsdorf@amd.com>

Signed-off-by: Venkatesh Pallipadi <venki@google.com>
Reviewed-by: Suresh Siddha <suresh.b.siddha@intel.com>

---

[ Sorry if this a duplicate. I missed out cc'ing lkml earlier ]


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-11  1:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-11  1:15 x86: Extend mtrr lookup to support regions spanning MTRR range Venkatesh Pallipadi
2010-09-11  1:15 ` [PATCH 1/2] x86: refactor MTRR type overlap check code Venkatesh Pallipadi
2010-09-11  1:15 ` [PATCH 2/2] x86: Support mtrr lookup for range spanning across MTRR range Venkatesh Pallipadi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox