diff options
author | Xiaoyao Li <xiaoyao.li@intel.com> | 2020-03-25 06:09:23 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-03-27 13:43:29 +0300 |
commit | dbaba47085b0c2aa793ce849750164bd3765e163 (patch) | |
tree | a398007467f441d2f871fba4c150e8a04fa016ca /Documentation/admin-guide/blockdev/zram.rst | |
parent | 6650cdd9a8ccf00555dbbe743d58541ad8feb6a7 (diff) | |
download | linux-dbaba47085b0c2aa793ce849750164bd3765e163.tar.xz |
x86/split_lock: Rework the initialization flow of split lock detection
Current initialization flow of split lock detection has following issues:
1. It assumes the initial value of MSR_TEST_CTRL.SPLIT_LOCK_DETECT to be
zero. However, it's possible that BIOS/firmware has set it.
2. X86_FEATURE_SPLIT_LOCK_DETECT flag is unconditionally set even if
there is a virtualization flaw that FMS indicates the existence while
it's actually not supported.
Rework the initialization flow to solve above issues. In detail, explicitly
clear and set split_lock_detect bit to verify MSR_TEST_CTRL can be
accessed, and rdmsr after wrmsr to ensure bit is cleared/set successfully.
X86_FEATURE_SPLIT_LOCK_DETECT flag is set only when the feature does exist
and the feature is not disabled with kernel param "split_lock_detect=off"
On each processor, explicitly updating the SPLIT_LOCK_DETECT bit based on
sld_sate in split_lock_init() since BIOS/firmware may touch it.
Originally-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200325030924.132881-2-xiaoyao.li@intel.com
Diffstat (limited to 'Documentation/admin-guide/blockdev/zram.rst')
0 files changed, 0 insertions, 0 deletions