From 1571a56ce2d42a8f56981108d80fb71f2293157b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Wed, 19 Sep 2018 09:05:23 +0200 Subject: [PATCH] feat: add L1D flush cpuid feature bit detection --- spectre-meltdown-checker.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index 03465d3..aeaef1e 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -2057,6 +2057,16 @@ check_cpu() pstatus yellow NO fi fi + # CPUID of L1D + _info_nol " * CPU indicates L1D flush capability: " + read_cpuid 0x7 $EDX 28 1 1; ret=$? + if [ $ret -eq 0 ]; then + pstatus green YES "L1D flush feature bit" + elif [ $ret -eq 1 ]; then + pstatus yellow NO + elif [ $ret -eq 2 ]; then + pstatus yellow UNKNOWN "is cpuid kernel module available?" + fi if is_intel; then _info " * Enhanced IBRS (IBRS_ALL)"