Re: [PATCH v5 11/15] x86/mtrr: construct a memory map with cache modes

From: Juergen Gross
Date: Fri Apr 21 2023 - 10:35:14 EST


On 21.04.23 13:23, Borislav Petkov wrote:
On Thu, Apr 20, 2023 at 05:10:03PM +0200, Juergen Gross wrote:
I think this will need another final loop over the MTRRs to check against the
constructed map if a MTRR is completely useless.

Yeah, I slept on it: so I think there should be a patch ontop which does
add debug output - disabled by default and controllable by adding
"mtrr=debug" on the cmdline or so - which dumps the cache map operations
(add/remove) and the final table.

Okay.

The reason being, when this cache_map thing hits upstream, we would need
a way to debug any potential issues which people might report so asking
them to do a "mtrr=debug" boot would be a good help.

And pls make the prints pr_info() and not pr_debug() because people
should not have to recompile in order to enable that.

Agreed.

Another question: in case we detect such a hidden MTRR, should it be disabled
in order to have more MTRRs available for run-time adding?

Let's not do anything for now and address this if really needed.

Okay.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature