x86/mm/pat: Prepare {reserve, free}_memtype() for "decoy" addresses
commit510ee090abc3dbc862bd35f5f3d8b7284a9117b4
authorDan Williams <dan.j.williams@intel.com>
Sat, 14 Jul 2018 04:50:27 +0000 (13 21:50 -0700)
committerDave Jiang <dave.jiang@intel.com>
Mon, 20 Aug 2018 16:22:45 +0000 (20 09:22 -0700)
treed2df0a6b7bc544752629f55255c8823dc3884d90
parent6100e34b2526e1dc3dbcc47fea2677974d6aaea5
x86/mm/pat: Prepare {reserve, free}_memtype() for "decoy" addresses

In preparation for using set_memory_uc() instead set_memory_np() for
isolating poison from speculation, teach the memtype code to sanitize
physical addresses vs __PHYSICAL_MASK.

The motivation for using set_memory_uc() for this case is to allow
ongoing access to persistent memory pages via the pmem-driver +
memcpy_mcsafe() until the poison is repaired.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: <linux-edac@vger.kernel.org>
Cc: <x86@kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
arch/x86/mm/pat.c