diff options
author | kib <kib@FreeBSD.org> | 2015-08-03 12:14:42 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-08-03 12:14:42 +0000 |
commit | b31c115daa6de83fc575d484bbd4f7114d62b234 (patch) | |
tree | 8808f62dbb04c4b1e243fcfa9bba1dc90c84a48e /sys/amd64/amd64/mp_machdep.c | |
parent | 67927a7a7c96545feb52784dea33376dcf127e76 (diff) | |
download | FreeBSD-src-b31c115daa6de83fc575d484bbd4f7114d62b234.zip FreeBSD-src-b31c115daa6de83fc575d484bbd4f7114d62b234.tar.gz |
Clear the IA32_MISC_ENABLE MSR bit, which limits the max CPUID
reported, on APs. We already did this on BSP.
Otherwise, the userspace software which depends on the features
reported by the high CPUID levels is misbehaving. In particular, AVX
detection is non-functional, depending on which CPU thread happens to
execute when doing CPUID. Another victim is the libthr signal
handlers interposer, which needs to save full FPU extended state.
Reported and tested by: Andre Meiser <ortadur@web.de>
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Diffstat (limited to 'sys/amd64/amd64/mp_machdep.c')
-rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index e91e6d5..a2ca9e2 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -252,6 +252,7 @@ init_secondary(void) wrmsr(MSR_FSBASE, 0); /* User value */ wrmsr(MSR_GSBASE, (u_int64_t)pc); wrmsr(MSR_KGSBASE, (u_int64_t)pc); /* XXX User value while we're in the kernel */ + intel_fix_cpuid(); lidt(&r_idt); |