Fix build with gas.
Do not use C constant suffixes. Bit values are small enough to not require typing, despite they are used for 64bit MSR writes. The added cast in hw_ibrs_recalculate() is redundand but I prefer to add it for clarity. Reported by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
ee5c94c18b
commit
c688c9051b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329214
@ -702,8 +702,8 @@
|
||||
* document 336996-001 Speculative Execution Side Channel Mitigations.
|
||||
*/
|
||||
/* MSR IA32_SPEC_CTRL */
|
||||
#define IA32_SPEC_CTRL_IBRS 0x0000000000000001ULL
|
||||
#define IA32_SPEC_CTRL_STIBP 0x0000000000000002ULL
|
||||
#define IA32_SPEC_CTRL_IBRS 0x00000001
|
||||
#define IA32_SPEC_CTRL_STIBP 0x00000002
|
||||
|
||||
/* MSR IA32_PRED_CMD */
|
||||
#define IA32_PRED_CMD_IBPB_BARRIER 0x0000000000000001ULL
|
||||
|
@ -592,7 +592,7 @@ 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 &= ~IA32_SPEC_CTRL_IBRS;
|
||||
v &= ~(uint64_t)IA32_SPEC_CTRL_IBRS;
|
||||
wrmsr(MSR_IA32_SPEC_CTRL, v);
|
||||
} else {
|
||||
v= rdmsr(MSR_IA32_SPEC_CTRL);
|
||||
|
Loading…
Reference in New Issue
Block a user