From 7df936f359766618470ae31a7cbf1b761bd19b59 Mon Sep 17 00:00:00 2001 From: Bin Lu Date: Wed, 4 Mar 2020 04:20:36 -0500 Subject: passed the syscall test case 'alarm' on Arm64 platform This issue was caused by 'restart_syscall'. The value of Register R0 should be stored after finishing sysemu. So that we can restore the value and restart syscall. Signed-off-by: Bin Lu --- pkg/sentry/arch/arch_aarch64.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/sentry/arch/arch_aarch64.go') diff --git a/pkg/sentry/arch/arch_aarch64.go b/pkg/sentry/arch/arch_aarch64.go index 5053393c1..01940bca4 100644 --- a/pkg/sentry/arch/arch_aarch64.go +++ b/pkg/sentry/arch/arch_aarch64.go @@ -97,6 +97,9 @@ type State struct { // FeatureSet is a pointer to the currently active feature set. FeatureSet *cpuid.FeatureSet + + // OrigR0 stores the value of register R0. + OrigR0 uint64 } // Proto returns a protobuf representation of the system registers in State. @@ -146,6 +149,7 @@ func (s *State) Fork() State { Regs: s.Regs, aarch64FPState: s.aarch64FPState.fork(), FeatureSet: s.FeatureSet, + OrigR0: s.OrigR0, } } -- cgit v1.2.3