[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/5] xen/wait: Extend the description of how this logic actually works


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 18 Jul 2022 12:00:17 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r6RRE/7vyec7TCnmbMoT+grO3CN/b298eviZj9dRqUU=; b=WWcnDLQvmdKJtlgt15DYtQRPTFdxL9Z3WxonsbwpmK9Y5xK1euM6dtUfGoJySG8GI1R82hw9tSofG01LIIyuKLP+mtF85s1NPmaLbDYIdLPYdewfbz6zJtJqF0vUIExm1uaS6+RnC6rszyJqxEdM6EhzL9bmf08cynNcMa5v3Hz/Qnz1p7l7QJs/6+yq+G7dFXYG5bYKJtt76GRpxaSWR7N2rnI2rSlM+8cnjmwsMqC/8TNOD6LTg6Edj8dF8pr2UfKWIdGe33rJPJzdQEnC75iQs1dOvcWsNGmTCFfM2xiG0aQEYuf5sk2w+Qqtf/eUtaw9SGYF2OXzkCgNaRiD5A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XJlrxNSfDHw+VY+fQ4x5tYiRkRUonC+QApLypJglL+kvJDa5mQue4Z0U7fBZ5Bn7KQRvQcKnam4hkaEIEEFooroUdwHY0HP75Qm+JimyWSk23g54YJL0HJ4Sv6A7kd9hNmud+RLSPtIZiaeIPOB3aogvfeP6JbhQE1dkvyJ7e7OG+MXj01HZfKqzElm8hlrgri5KftlSMHELZmsVzV+G0TnnA+B/01n9K0xZr1rXcman44osg+2C1hqThi6/eSz/1cVNuXHIEfFXzMgyoW9u6bN3dFGBNWu7THCt07IC7uERhXn14+lBk+e8wNq2+UjdN/6ysYc616SfJN03jVio4A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 18 Jul 2022 10:00:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 <jbeulich@xxxxxxxx>

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.