From ebaf29abeb5e6e6cd87f4b0088719abb30e9d4cb Mon Sep 17 00:00:00 2001 From: Bin Lu Date: Fri, 14 Feb 2020 02:04:41 -0500 Subject: passed the kvm test case of "TestKernelSyscall" on Arm64 For kvm test case "TestKernelSyscall", redpill/syscall(-1) in guest kernel level will be trapped in el1_svc. And in el1_svc, we use mmio_exit to leave the guest. Signed-off-by: Bin Lu --- pkg/sentry/platform/ring0/kernel_arm64.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/sentry/platform/ring0/kernel_arm64.go') diff --git a/pkg/sentry/platform/ring0/kernel_arm64.go b/pkg/sentry/platform/ring0/kernel_arm64.go index c3d341998..ccacaea6b 100644 --- a/pkg/sentry/platform/ring0/kernel_arm64.go +++ b/pkg/sentry/platform/ring0/kernel_arm64.go @@ -16,6 +16,14 @@ package ring0 +// HaltAndResume halts execution and point the pointer to the resume function. +//go:nosplit +func HaltAndResume() + +// HaltEl1SvcAndResume calls Hooks.KernelSyscall and resume. +//go:nosplit +func HaltEl1SvcAndResume() + // init initializes architecture-specific state. func (k *Kernel) init(opts KernelOpts) { // Save the root page tables. -- cgit v1.2.3