Do not enable PTI when IA32_ARCH_CAP_RDCL_NO bit is set.

Intel document 336996-001 claims that this will be the way to inform
about Meltdown correction.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2018-01-31 14:25:42 +00:00
parent cb57d1dd30
commit 3b5319325e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328624

View File

@ -1614,7 +1614,8 @@ pti_get_default(void)
if (strcmp(cpu_vendor, AMD_VENDOR_ID) == 0)
return (0);
if ((cpu_ia32_arch_caps & IA32_ARCH_CAP_RDCL_NO) != 0)
return (0);
return (1);
}