diff options
author | Bin Lu <bin.lu@arm.com> | 2019-11-26 15:57:07 +0800 |
---|---|---|
committer | Bin Lu <bin.lu@arm.com> | 2019-11-26 15:57:15 +0800 |
commit | 3e0062480650ded910ef6bc80883668da89e2ef8 (patch) | |
tree | 79b6743e2c14a65ff7d42ce05300e937c9887287 /pkg/sentry/platform/ring0 | |
parent | b72e1b3c0873ea29d031db42e39ca053923eecff (diff) |
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 <bin.lu@arm.com>
Diffstat (limited to 'pkg/sentry/platform/ring0')
-rw-r--r-- | pkg/sentry/platform/ring0/entry_arm64.s | 10 |
1 files changed, 10 insertions, 0 deletions
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: |