summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-06-10 01:08:30 +0000
committergVisor bot <gvisor-bot@google.com>2020-06-10 01:08:30 +0000
commit3cdc796936d39c0c2173d371f97c084c94f8d2a4 (patch)
tree5476fae9eab4995d0bd8781944fc28ed585b7283 /pkg/sentry
parenta0936feeec82f5913d5f41b7ab0d95f5ac6c077b (diff)
parent52c922f7c00c3cdb5ddf001ae453cc65881cde2c (diff)
Merge release-20200522.0-111-g52c922f7c (automated)
Diffstat (limited to 'pkg/sentry')
-rw-r--r--pkg/sentry/arch/arch_aarch64.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkg/sentry/arch/arch_aarch64.go b/pkg/sentry/arch/arch_aarch64.go
index 343f81f59..daba8b172 100644
--- a/pkg/sentry/arch/arch_aarch64.go
+++ b/pkg/sentry/arch/arch_aarch64.go
@@ -17,7 +17,6 @@
package arch
import (
- "encoding/binary"
"fmt"
"io"
@@ -49,9 +48,14 @@ const ARMTrapFlag = uint64(1) << 21
type aarch64FPState []byte
// initAarch64FPState sets up initial state.
+//
+// Related code in Linux kernel: fpsimd_flush_thread().
+// FPCR = FPCR_RM_RN (0x0 << 22).
+//
+// Currently, aarch64FPState is only a space of 0x210 length for fpstate.
+// The fp head is useless in sentry/ptrace/kvm.
+//
func initAarch64FPState(data aarch64FPState) {
- binary.LittleEndian.PutUint32(data, fpsimdMagic)
- binary.LittleEndian.PutUint32(data[4:], fpsimdContextSize)
}
func newAarch64FPStateSlice() []byte {