diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-01-30 18:16:16 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-01-30 18:16:16 +0000 |
commit | 08c27175c040412b94b349a9a87b055f7c7e2886 (patch) | |
tree | 22f65ad42332ceed50c9909f936980bcee44ce27 | |
parent | 2829b90acddad106f58cf10a65a212cd3ac6c81e (diff) | |
parent | 757b2b87fed1022fb9e73c66210ec07b5ec5cb2f (diff) |
Merge release-20200127.0-37-g757b2b8 (automated)
-rwxr-xr-x | pkg/sentry/platform/ring0/defs_impl_arm64.go | 7 | ||||
-rwxr-xr-x | pkg/sentry/platform/ring0/entry_impl_arm64.s | 14 |
2 files changed, 17 insertions, 4 deletions
diff --git a/pkg/sentry/platform/ring0/defs_impl_arm64.go b/pkg/sentry/platform/ring0/defs_impl_arm64.go index bb4a6a10c..27d2edcb2 100755 --- a/pkg/sentry/platform/ring0/defs_impl_arm64.go +++ b/pkg/sentry/platform/ring0/defs_impl_arm64.go @@ -82,14 +82,14 @@ const ( El0Sync_undef El0Sync_dbg El0Sync_inv - VirtualizationException _NR_INTERRUPTS ) // System call vectors. const ( - Syscall Vector = El0Sync_svc - PageFault Vector = El0Sync_da + Syscall Vector = El0Sync_svc + PageFault Vector = El0Sync_da + VirtualizationException Vector = El0Error ) // VirtualAddressBits returns the number bits available for virtual addresses. @@ -368,6 +368,7 @@ func Emit(w io.Writer) { fmt.Fprintf(w, "#define PageFault 0x%02x\n", PageFault) fmt.Fprintf(w, "#define Syscall 0x%02x\n", Syscall) + fmt.Fprintf(w, "#define VirtualizationException 0x%02x\n", VirtualizationException) p := &syscall.PtraceRegs{} fmt.Fprintf(w, "\n// Ptrace registers.\n") diff --git a/pkg/sentry/platform/ring0/entry_impl_arm64.s b/pkg/sentry/platform/ring0/entry_impl_arm64.s index 876b3a6ba..8dc02dc82 100755 --- a/pkg/sentry/platform/ring0/entry_impl_arm64.s +++ b/pkg/sentry/platform/ring0/entry_impl_arm64.s @@ -665,7 +665,19 @@ TEXT ·El0_fiq(SB),NOSPLIT,$0 B ·Shutdown(SB) TEXT ·El0_error(SB),NOSPLIT,$0 - B ·Shutdown(SB) + KERNEL_ENTRY_FROM_EL0 + WORD $0xd538d092 //MRS TPIDR_EL1, R18 + WORD $0xd538601a //MRS FAR_EL1, R26 + + MOVD R26, CPU_FAULT_ADDR(RSV_REG) + + MOVD $1, R3 + MOVD R3, CPU_ERROR_TYPE(RSV_REG) // Set error type to user. + + MOVD $VirtualizationException, R3 + MOVD R3, CPU_VECTOR_CODE(RSV_REG) + + B ·Halt(SB) TEXT ·El0_sync_invalid(SB),NOSPLIT,$0 B ·Shutdown(SB) |