]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: Store full 64bit of FIP/FDP for 64bit processes when using XSAVE.
authorkib <kib@FreeBSD.org>
Sat, 3 Oct 2020 23:17:29 +0000 (23:17 +0000)
committerkib <kib@FreeBSD.org>
Sat, 3 Oct 2020 23:17:29 +0000 (23:17 +0000)
commit62a9018a8878533432500e5cb89f9bd07fd9ef14
tree8e1e25c0250638f5055a13e9e0f9b44fd7f94dfc
parent8033907adaea56d2ac46e5ffcce3acb82cf04c61
amd64: Store full 64bit of FIP/FDP for 64bit processes when using XSAVE.

If current process is 64bit, use rex-prefixed version of XSAVE
(XSAVE64).  If current process is 32bit and CPU supports saving
segment registers cs/ds in the FPU save area, use non-prefixed variant
of XSAVE.

Reported and tested by: Michał Górny <mgorny@mgorny@moritz.systems>
PR: 250043
Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D26643
sys/amd64/amd64/cpu_switch.S
sys/amd64/amd64/fpu.c
sys/amd64/include/md_var.h