From db7d3206fd1b7d11b786c9fb105f345f3471e396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Tue, 14 May 2019 20:30:47 +0200 Subject: [PATCH] feat(mds): add detection of availability of MD_CLEAR instruction --- spectre-meltdown-checker.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index 648aa5b..13b4f6c 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -2337,6 +2337,20 @@ check_cpu() pstatus yellow UNKNOWN "is cpuid kernel module available?" fi + if is_intel; then + _info " * Microarchitecture Data Sampling" + _info_nol " * MD_CLEAR instruction is available: " + read_cpuid 0x7 $EDX 10 1 1; ret=$? + if [ $ret -eq 0 ]; then + #cpuid_md_clear=1 + pstatus green YES + elif [ $ret -eq 2 ]; then + pstatus yellow UNKNOWN "is cpuid kernel module available?" + else + pstatus yellow NO + fi + fi + if is_intel; then _info " * Enhanced IBRS (IBRS_ALL)" _info_nol " * CPU indicates ARCH_CAPABILITIES MSR availability: "