On 18.07.2022 09:18, Andrew Cooper wrote: > @@ -199,9 +211,18 @@ void check_wakeup_from_wait(void) > } > > /* > - * Hand-rolled longjmp(). Returns to __prepare_to_wait(), and lands on a > - * `rep movs` instruction. All other GPRs are restored from the stack, > so > - * are available for use here. > + * Hand-rolled longjmp(). > + * > + * check_wakeup_from_wait() is always called with a shallow stack, > + * immediately after the vCPU has been rescheduled. > + * > + * Adjust %rsp to be the correct depth for the (deeper) stack we want to > + * restore, then prepare %rsi, %rdi and %rcx such that when we intercept > + * the rep movs in __prepare_to_wait(), it copies from wqv->stack over > the > + * active stack.
I'm struggling with the use of "intercept" here, but I guess that's just because I'm not a native speaker. > + * All other GPRs are available for use; they're either restored from > + * wqv->stack or explicitly clobbered. You talking of "other GPRs" - there aren't any which are explicitly clobbered. It's only the previously named ones which are. Hence I'd like to ask that the respective parts of the sentence be dropped. Then Reviewed-by: Jan Beulich <[email protected]> Jan
