Skip to content

libmicrokit: add microkit_vcpu_x86_deferred_resume() call#431

Open
dreamliner787-9 wants to merge 3 commits intoseL4:mainfrom
au-ts:x86_vcpu_resume
Open

libmicrokit: add microkit_vcpu_x86_deferred_resume() call#431
dreamliner787-9 wants to merge 3 commits intoseL4:mainfrom
au-ts:x86_vcpu_resume

Conversation

@dreamliner787-9
Copy link
Contributor

@dreamliner787-9 dreamliner787-9 commented Mar 9, 2026

Depends on seL4/seL4#1534, I've worked around this for now by including vmenter.h in libmicrokit/include/microkit.h.

Previously, the Microkit event handler had no mechanism on x86 to resume a vCPU while simultaneously waiting for an incoming notification. This PR adds microkit_vcpu_x86_deferred_resume() to libmicrokit, providing a cleaner way to integrate x86 vCPU resumption with the Microkit event handler.

Due to a kernel limitation in void NORETURN slowpath(syscall_t syscall) of src/arch/x86/c_traps.c, only the VMM's TCB bound Notification is checked for a pending Notification. An endpoint object can't passed to seL4_VMEnter() so PPCs won't work while the VCPU is running. Technically, PPCs still work if the VCPU isn't resumed, but I feel like we should not expose this footgun to users.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants