feat(mds): add detection of availability of MD_CLEAR instruction

This commit is contained in:
Stéphane Lesimple 2019-05-14 20:30:47 +02:00
parent 1d13a423b8
commit db7d3206fd

View File

@ -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: "