x86/mm/cpa: Add debug mechanism
authorThomas Gleixner <tglx@linutronix.de>
Mon, 17 Sep 2018 14:29:11 +0000 (16:29 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 27 Sep 2018 18:39:38 +0000 (20:39 +0200)
commit4046460b867f8b041c81c26c09d3bcad6d6e814e
tree057fe915206b0f01b9db253b7871561d28be5824
parent91ee8f5c1f50a1f4096c178a93a8da46ce3f6cc8
x86/mm/cpa: Add debug mechanism

The whole static protection magic is silently fixing up anything which is
handed in. That's just wrong. The offending call sites need to be fixed.

Add a debug mechanism which emits a warning if a requested mapping needs to be
fixed up. The DETECT debug mechanism is really not meant to be enabled except
for developers, so limit the output hard to the protection fixups.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Dave Hansen <dave.hansen@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Bin Yang <bin.yang@intel.com>
Cc: Mark Gross <mark.gross@intel.com>
Link: https://lkml.kernel.org/r/20180917143546.078998733@linutronix.de
arch/x86/mm/pageattr.c