x86/resctrl: Fix to restore to original value when re-enabling hardware prefetch...
authorKohei Tarumizu <tarumizu.kohei@fujitsu.com>
Wed, 24 Aug 2022 16:44:10 +0000 (09:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:40 +0000 (12:34 +0200)
commit0559a6d96a991e421a8550a595e10465a31dacc7
tree3d209cc419e8554454cca931a6c5a26d2b0f77d5
parente962e458bf96df2583b974a3ab272dd8a4bdb983
x86/resctrl: Fix to restore to original value when re-enabling hardware prefetch register

[ Upstream commit 499c8bb4693d1c8d8f3d6dd38e5bdde3ff5bd906 ]

The current pseudo_lock.c code overwrites the value of the
MSR_MISC_FEATURE_CONTROL to 0 even if the original value is not 0.
Therefore, modify it to save and restore the original values.

Fixes: 018961ae5579 ("x86/intel_rdt: Pseudo-lock region creation/removal core")
Fixes: 443810fe6160 ("x86/intel_rdt: Create debugfs files for pseudo-locking testing")
Fixes: 8a2fc0e1bc0c ("x86/intel_rdt: More precise L2 hit/miss measurements")
Signed-off-by: Kohei Tarumizu <tarumizu.kohei@fujitsu.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lkml.kernel.org/r/eb660f3c2010b79a792c573c02d01e8e841206ad.1661358182.git.reinette.chatre@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kernel/cpu/resctrl/pseudo_lock.c