gvisor/pkg/ring0
Jamie Liu 3f1642e4bc Remove ring0 floating point save/load functions on amd64.
ring0.Save/LoadFloatingPoint() are only usable if the caller can ensure that Go
will not clobber floating point registers before/after calling them
respectively. Due to regabig in Go 1.17, this is no longer the case; regabig
(among other things) maintains a zeroed XMM15 during ABIInternal execution,
including by zeroing it after ABI0-to-ABIInternal transitions. In
ring0.sysenter/exception, this happens in
ring0.kernelSyscall/kernelException.abi0 respectively; in
ring0.CPU.SwitchToUser, this happens after returning from
ring0.sysret/iret.abi0. Delete these functions and do floating point save/load
in assembly.

While arm64 doesn't appear to be immediately affected (so this CL permits us to
resume usage of Go 1.17), its use of Save/LoadFloatingPoint() still seems to be
incorrect for the same fundamental reason (Go code can't sanely assume what
registers the Go compiler will or won't use) and should be fixed eventually.

PiperOrigin-RevId: 401895658
2021-10-08 18:03:23 -07:00
..
gen_offsets [syserror] Split usermem package 2021-03-29 13:30:21 -07:00
pagetables kvm: trap mmap syscalls to map new regions to the guest 2021-09-22 14:39:36 -07:00
BUILD [syserror] Split usermem package 2021-03-29 13:30:21 -07:00
aarch64.go
defs.go
defs_amd64.go
defs_arm64.go Add go:build directives as required by Go 1.17's gofmt. 2021-07-20 16:28:45 -07:00
entry_amd64.go
entry_amd64.s
entry_arm64.go Add go:build directives as required by Go 1.17's gofmt. 2021-07-20 16:28:45 -07:00
entry_arm64.s arm64 kvm:implement basic lazy save and restore for FPSIMD registers 2021-02-03 11:50:36 +00:00
kernel.go
kernel_amd64.go
kernel_arm64.go
kernel_unsafe.go
lib_amd64.go
lib_amd64.s Remove ring0 floating point save/load functions on amd64. 2021-10-08 18:03:23 -07:00
lib_arm64.go
lib_arm64.s
offsets_amd64.go
offsets_arm64.go Add go:build directives as required by Go 1.17's gofmt. 2021-07-20 16:28:45 -07:00
ring0.go Move ring0 package. 2021-02-02 12:03:26 -08:00
x86.go