freebsd-skq/sys/amd64/amd64
Konstantin Belousov fdfe249b63 Fix initial x87 state after r345562.
After the referenced commit, we did not set x87 and sse valid bits in
the xstate_bv bitmask for initial fpu state (stored in memory), when
using XSAVE.

The state is loaded into FPU register file to initialize the process
FPU state, and since both bits were clear, the default x87 and SSE
states were loaded.  By chance, FreeBSD ABI SSE2 state is same as FPU
initial state, so the bug is not visible for 64bit processes.  But on
i386, the precision control should be set to double (53bit mantissa),
instead of the default double extended (64bit mantissa). For 32bit
processes on amd64, kernel reloads control word with the right mask,
which only left native i386 and amd64 native but using x87 as
affected.

Fix it by setting minimal required xstate_bv mask.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2019-04-16 19:46:02 +00:00
..
apic_vector.S Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
atpic_vector.S Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
bios.c sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
bpf_jit_machdep.c Make UMA and malloc(9) return non-executable memory in most cases. 2018-06-13 17:04:41 +00:00
bpf_jit_machdep.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
copyout.c amd64: macroify copyin/copyout and provide erms variants 2018-09-20 18:30:17 +00:00
cpu_switch.S amd64: rewrite cpu_switch.S fragment to reload tss.rsp0 on context switch. 2019-03-16 11:12:02 +00:00
db_disasm.c sys: Replace zero with NULL for pointers. 2017-02-22 02:35:59 +00:00
db_interface.c x86: Report per-cpu IPI TLB shootdown generation in ddb 'show pcpu' output. 2019-01-04 17:25:47 +00:00
db_trace.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
efirt_machdep.c Catch exceptions during EFI RT calls on amd64. 2018-09-02 21:37:05 +00:00
efirt_support.S Catch exceptions during EFI RT calls on amd64. 2018-09-02 21:37:05 +00:00
elf_machdep.c Remove sv_pagesize, originally introduced with r100384. 2019-03-01 16:16:38 +00:00
exception.S amd64: clear callee-preserved registers on syscall exit. 2019-02-05 17:49:27 +00:00
fpu.c Fix initial x87 state after r345562. 2019-04-16 19:46:02 +00:00
gdb_machdep.c Provide KPI for handling of rw/ro kernel text. 2018-03-20 17:43:50 +00:00
genassym.c Catch exceptions during EFI RT calls on amd64. 2018-09-02 21:37:05 +00:00
in_cksum.c spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
initcpu.c Provide deterministic (and somewhat useful) value for RDPID result, 2019-03-15 16:43:28 +00:00
io.c sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
locore.S Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
machdep.c Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
mem.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
minidump_machdep.c Print the dump progress indicator after calling dump_start(). 2018-05-01 17:32:43 +00:00
mp_machdep.c Several bug fixes and robustness improvements for the AP boot page 2018-08-28 18:47:02 +00:00
mpboot.S x86: improve reservation of AP trampoline memory 2018-04-05 14:39:51 +00:00
pmap.c Disallow preemptive creation of wired superpage mappings. 2019-03-21 19:52:50 +00:00
prof_machdep.c Fix high resolution kernel profiling just enough to not crash at boot 2018-06-02 05:48:44 +00:00
ptrace_machdep.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sigtramp.S Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
support.S amd64: stop re-reading curpc on subyte/suword 2018-12-08 04:53:08 +00:00
sys_machdep.c Add kernel support for Intel userspace protection keys feature on 2019-02-20 09:51:13 +00:00
trap.c Add kernel support for Intel userspace protection keys feature on 2019-02-20 09:51:13 +00:00
uio_machdep.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
uma_machdep.c Use vm_page_unwire_noq() instead of directly modifying page wire counts. 2018-02-08 19:28:51 +00:00
vm_machdep.c amd64 KPTI: add control from procctl(2). 2019-03-16 11:44:33 +00:00
xen-locore.S xen: implement early init helper for PVHv2 2018-07-19 08:44:52 +00:00