Add hvc 6 yield runtime hook#42
Conversation
b2ac147 to
aece814
Compare
jserv
left a comment
There was a problem hiding this comment.
Chec https://cbea.ms/git-commit/ carefully and enforce the rules accordingly.
|
Updated the mesage |
|
I defer to @Max042004 for confirmation. |
|
It may happen data race. |
aece814 to
42d897a
Compare
|
Dear @Max042004 I replaced the shared guest_t flag with a thread-local yield request.
|
if (hvc6_yield_requested) {
- hvc6_yield_requested = false;
running = false;you can consider this change. But it is fine to remain current commit. LGTM |
|
Noted. Please allow me to keep it to avoids a mistake if future code ever checks the flag outside this exact handler path |
|
Thank @doanbaotrung for contributing! |
Cooperative yield request from the HVC 6 handler. When set, the current guest run loop exits after the handler returns and control is yielded back to the host.
Summary by cubic
Add a cooperative yield path for HVC 6 so the handler can request the vCPU run loop to exit and return control to the host right after it returns. Introduces a thread-local runtime hook via
proc_request_hvc6_yield()thatvcpu_run_loopclears before the HVC 6 handler and checks after; when set, the loop stops immediately after the handler returns.Written for commit 42d897a. Summary will update on new commits. Review in cubic