summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/arch/arch_aarch64.go
diff options
context:
space:
mode:
authorBin Lu <bin.lu@arm.com>2020-03-04 04:20:36 -0500
committerBin Lu <bin.lu@arm.com>2020-03-12 05:57:47 -0400
commit7df936f359766618470ae31a7cbf1b761bd19b59 (patch)
treedb6971413c2861ce51aebbb435f493ba0261c503 /pkg/sentry/arch/arch_aarch64.go
parentef1219c1451a75916693a54ddad39d04cf763d90 (diff)
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 <bin.lu@arm.com>
Diffstat (limited to 'pkg/sentry/arch/arch_aarch64.go')
-rw-r--r--pkg/sentry/arch/arch_aarch64.go4
1 files changed, 4 insertions, 0 deletions
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,
}
}