From 3e0062480650ded910ef6bc80883668da89e2ef8 Mon Sep 17 00:00:00 2001 From: Bin Lu Date: Tue, 26 Nov 2019 15:57:07 +0800 Subject: passed the kvm test case of "TestApplicationSyscall" on Arm64 platform For test case "TestApplicationSyscall", Syscall in guest user level will be trapped in el0_svc. And in el0_svc, we use mmio_exit to leave the KVM guest for now. Signed-off-by: Bin Lu --- pkg/sentry/platform/ring0/entry_arm64.s | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pkg/sentry/platform') diff --git a/pkg/sentry/platform/ring0/entry_arm64.s b/pkg/sentry/platform/ring0/entry_arm64.s index 29c475882..bd9f09469 100644 --- a/pkg/sentry/platform/ring0/entry_arm64.s +++ b/pkg/sentry/platform/ring0/entry_arm64.s @@ -441,6 +441,16 @@ TEXT ·El0_sync(SB),NOSPLIT,$0 B el0_invalid el0_svc: + WORD $0xd538d092 //MRS TPIDR_EL1, R18 + + MOVD $0, CPU_ERROR_CODE(RSV_REG) // Clear error code. + + MOVD $1, R3 + MOVD R3, CPU_ERROR_TYPE(RSV_REG) // Set error type to user. + + MOVD $Syscall, R3 + MOVD R3, CPU_VECTOR_CODE(RSV_REG) + B ·Halt(SB) el0_da: -- cgit v1.2.3