diff options
author | Bin Lu <bin.lu@arm.com> | 2020-10-15 22:34:39 -0400 |
---|---|---|
committer | Bin Lu <bin.lu@arm.com> | 2020-10-18 21:47:12 -0400 |
commit | 3b735c8fec750a9074b0e4c602a43bc5ecebb56a (patch) | |
tree | ed8363715be14ae96dc3e1622e5a3ce6eb1aceff /pkg/sentry/platform/kvm | |
parent | 0a7e32bd17fb3f4aae8fdea427283cda49fe002f (diff) |
arm64 kvm: handle exception from accessing undefined instruction
Consistent with the linux approach, we will produce a sigill to handle
el0_undef.
After applying this patch, exec_binary_test_runsc_kvm will be passed on
Arm64.
Signed-off-by: Bin Lu <bin.lu@arm.com>
Diffstat (limited to 'pkg/sentry/platform/kvm')
-rw-r--r-- | pkg/sentry/platform/kvm/machine_arm64_unsafe.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/sentry/platform/kvm/machine_arm64_unsafe.go b/pkg/sentry/platform/kvm/machine_arm64_unsafe.go index a163f956d..84992c06d 100644 --- a/pkg/sentry/platform/kvm/machine_arm64_unsafe.go +++ b/pkg/sentry/platform/kvm/machine_arm64_unsafe.go @@ -235,8 +235,9 @@ func (c *vCPU) SwitchToUser(switchOpts ring0.SwitchOpts, info *arch.SignalInfo) return c.fault(int32(syscall.SIGSEGV), info) case ring0.Vector(bounce): // ring0.VirtualizationException return usermem.NoAccess, platform.ErrContextInterrupt - case ring0.El0Sync_undef, - ring0.El1Sync_undef: + case ring0.El0Sync_undef: + return c.fault(int32(syscall.SIGILL), info) + case ring0.El1Sync_undef: *info = arch.SignalInfo{ Signo: int32(syscall.SIGILL), Code: 1, // ILL_ILLOPC (illegal opcode). |