Skip to content
Snippets Groups Projects
Commit a3253623 authored by Anna Lyons's avatar Anna Lyons
Browse files

x86: check vcpu is set on seL4_VMEnter

Prio to this change the kernel would crash if a thread with no VCPU
attempted to seL4_VMEnter. As of this commit, an unknown syscall exception
will be raised and the kernel will not crash.
parent 7314c9e3
No related branches found
No related tags found
No related merge requests found
......@@ -111,7 +111,7 @@ slowpath(syscall_t syscall)
{
#ifdef CONFIG_VTX
if (syscall == SysVMEnter) {
if (syscall == SysVMEnter && NODE_STATE(ksCurThread)->tcbArch.tcbVCPU) {
vcpu_update_state_sysvmenter(NODE_STATE(ksCurThread)->tcbArch.tcbVCPU);
if (NODE_STATE(ksCurThread)->tcbBoundNotification && notification_ptr_get_state(NODE_STATE(ksCurThread)->tcbBoundNotification) == NtfnState_Active) {
completeSignal(NODE_STATE(ksCurThread)->tcbBoundNotification, NODE_STATE(ksCurThread));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment