From a01fc7108f68b6e5098f97f837f7f7b91edf91df Mon Sep 17 00:00:00 2001 From: Howard Zhang Date: Thu, 25 Mar 2021 17:06:44 +0800 Subject: [PATCH 1/2] Fix nogo test error Signed-off-by: Howard Zhang --- pkg/ring0/lib_arm64.go | 3 ++- pkg/sentry/arch/fpu/fpu_arm64.go | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/ring0/lib_arm64.go b/pkg/ring0/lib_arm64.go index edf24eda3..e44df00a6 100644 --- a/pkg/ring0/lib_arm64.go +++ b/pkg/ring0/lib_arm64.go @@ -62,9 +62,10 @@ func LoadFloatingPoint(*byte) // SaveFloatingPoint saves floating point state. func SaveFloatingPoint(*byte) +// FPSIMDDisableTrap disables fpsimd. func FPSIMDDisableTrap() -// DisableVFP disables fpsimd. +// FPSIMDEnableTrap enables fpsimd. func FPSIMDEnableTrap() // Init sets function pointers based on architectural features. diff --git a/pkg/sentry/arch/fpu/fpu_arm64.go b/pkg/sentry/arch/fpu/fpu_arm64.go index d2f62631d..46634661f 100644 --- a/pkg/sentry/arch/fpu/fpu_arm64.go +++ b/pkg/sentry/arch/fpu/fpu_arm64.go @@ -58,6 +58,8 @@ func (s *State) Fork() State { } // BytePointer returns a pointer to the first byte of the state. +// +//go:nosplit func (s *State) BytePointer() *byte { return &(*s)[0] } From 253f180c691e762ea94291f9a24eb532bf6d1ee7 Mon Sep 17 00:00:00 2001 From: Howard Zhang Date: Thu, 25 Mar 2021 17:14:38 +0800 Subject: [PATCH 2/2] Fix comments error Signed-off-by: Howard Zhang --- pkg/sentry/platform/kvm/machine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sentry/platform/kvm/machine.go b/pkg/sentry/platform/kvm/machine.go index 0e4cf01e1..5d586f257 100644 --- a/pkg/sentry/platform/kvm/machine.go +++ b/pkg/sentry/platform/kvm/machine.go @@ -436,7 +436,7 @@ func (m *machine) Get() *vCPU { } // The vCPU is not be able to transition to - // vCPUGuest|vCPUUser or to vCPUUser because that + // vCPUGuest|vCPUWaiter or to vCPUUser because that // transition requires holding the machine mutex, as we // do now. There is no path to register a waiter on // just the vCPUReady state.