diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-04-10 00:35:45 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-04-10 00:35:45 +0000 |
commit | b49ed2038a13acf391f26a6b4ef7e7808b53103d (patch) | |
tree | c1e2be0fa174d273cb68a5a858c301302749ac89 /pkg/sentry/arch/fpu | |
parent | 4c57ae1fda3e3ae786efc905665bd3aa7b09a730 (diff) | |
parent | 7420821a7b5fe15f3666bb4971796cd45fc5ff38 (diff) |
Merge release-20210408.0-15-g7420821a7 (automated)
Diffstat (limited to 'pkg/sentry/arch/fpu')
-rw-r--r-- | pkg/sentry/arch/fpu/fpu_amd64.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/sentry/arch/fpu/fpu_amd64.go b/pkg/sentry/arch/fpu/fpu_amd64.go index 1e9625bee..f0ba26736 100644 --- a/pkg/sentry/arch/fpu/fpu_amd64.go +++ b/pkg/sentry/arch/fpu/fpu_amd64.go @@ -219,6 +219,11 @@ func (s *State) PtraceSetXstateRegs(src io.Reader, maxlen int, featureSet *cpuid return copy(*s, f), nil } +// SetMXCSR sets the MXCSR control/status register in the state. +func (s *State) SetMXCSR(mxcsr uint32) { + hostarch.ByteOrder.PutUint32((*s)[mxcsrOffset:], mxcsr) +} + // BytePointer returns a pointer to the first byte of the state. // //go:nosplit |