Skip to content

Commit

Permalink
Do not resume TCB explicitly when advancing vCPU
Browse files Browse the repository at this point in the history
See comment for explanation, but essentially it's not necessary.

Signed-off-by: Ivan-Velickovic <[email protected]>
  • Loading branch information
Ivan-Velickovic committed Nov 13, 2024
1 parent 6ee407c commit 8e2df81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/arch/aarch64/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ bool fault_advance_vcpu(size_t vcpu_id, seL4_UserContext *regs)
// For now we just ignore it and continue
// Assume 32-bit instruction
regs->pc += 4;
int err = seL4_TCB_WriteRegisters(BASE_VM_TCB_CAP + vcpu_id, true, 0, SEL4_USER_CONTEXT_SIZE, regs);
/*
* Do not explicitly resume the TCB because we will eventually reply to the
* fault which will result in the TCB being restarted.
*/
int err = seL4_TCB_WriteRegisters(BASE_VM_TCB_CAP + vcpu_id, false, 0, SEL4_USER_CONTEXT_SIZE, regs);
assert(err == seL4_NoError);

return (err == seL4_NoError);
Expand Down

0 comments on commit 8e2df81

Please sign in to comment.