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:
kib 2018-02-13 15:30:31 +00:00
parent 2dd567b6c9
commit 59d970a7ef
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -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);