Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
This commit is contained in:
Konstantin Belousov 2018-05-19 21:36:55 +00:00
parent b97c07ccc1
commit ba6ce3a34b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333896

View File

@ -773,11 +773,11 @@ hw_ibrs_recalculate(void)
if ((cpu_ia32_arch_caps & IA32_ARCH_CAP_IBRS_ALL) != 0) {
if (hw_ibrs_disable) {
v= rdmsr(MSR_IA32_SPEC_CTRL);
v = rdmsr(MSR_IA32_SPEC_CTRL);
v &= ~(uint64_t)IA32_SPEC_CTRL_IBRS;
wrmsr(MSR_IA32_SPEC_CTRL, v);
} else {
v= rdmsr(MSR_IA32_SPEC_CTRL);
v = rdmsr(MSR_IA32_SPEC_CTRL);
v |= IA32_SPEC_CTRL_IBRS;
wrmsr(MSR_IA32_SPEC_CTRL, v);
}