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

Re: [PATCH v3 08/18] xen/arm32: head: Introduce an helper to flush the TLBs


  • To: Julien Grall <julien@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Wed, 14 Dec 2022 15:24:53 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=rViC0E6/8AxUopNptHfoO3R1Lvi/izGcKZXYR4IMSb0=; b=axzh4JPx9QXNx/yLZxDcZYfJei8K5ujkFYc3j/2LtCodFlAZBTrW2Mv6vOzeF+8Yo+tbETh2+NiHCGVCEwQ4U/9g+IXZv304TKwEFs/VbE60wrHQUQwjyIWTD99NlQtqt6cpHYYj7XfWvyOVoyiKPreU5Evs4oWQoxDJyRv1koKiSlr9XbiwhmkQO7rwi0U2r7cjDde5zhuWqA03+wKRkxQ8l5ZTM0INOzoB7WidKrXSipfrUwbbtwc1cUjKEHh44i4Sm6SYacXRNeADbRkLLLP8zoW9bcwNwj2Jr/o5qTwyw+u1znT46cJo67hukcjeiec4CG6ttzKgqcR4QrxvfQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FRH/j4oFBLyXnD/qELhnEXEwIvNooFbanKgRbYE/1iqulMlSCAZs6bf7vbSoyOi5+1pTfJ1FHjieSwxoCpJ3zqw7DTc5JIgGG/O7Krxk2vZgj48xJYC25JJ0SdBqnltChzp1hW60ErwdtUuLq/Z7yBqNB7kepRseMyiYIYTPmJtSqwEjLGXI43JLXjto9GRFG6gYRhkszZuOuhT/Im5iZGTsbQe9NV1/ubc5sNYElgAG4/xkmzELZ01R8bNpzSHWv82YnScQp7MGnnbVBk2nSHEJxHvk9jIOL5nK0mvUDD+5WUrELHSgxMVU+HQpMRl3ckCvNMRylAxE3QOivOY6Fw==
  • Cc: <Luca.Fancellu@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 14 Dec 2022 14:25:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Julien,

On 12/12/2022 10:55, Julien Grall wrote:
> 
> 
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> The sequence for flushing the TLBs is 4 instruction long and often
> requires an explanation how it works.
> 
> So create an helper and use it in the boot code (switch_ttbr() is left
Here and in title: s/an helper/a helper/

> alone for now).
Could you explain why?

> 
> Note that in secondary_switched, we were also flushing the instruction
> cache and branch predictor. Neither of them was necessary because:
>     * We are only supporting IVIPT cache on arm32, so the instruction
>       cache flush is only necessary when executable code is modified.
>       None of the boot code is doing that.
>     * The instruction cache is not invalidated and misprediction is not
>       a problem at boot.
> 
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>

Apart from that, the patch is good, so:
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

> 
> ---
>     Changes in v3:
>         * Fix typo
>         * Update the documentation
>         * Rename the argument from tmp1 to tmp
> ---
>  xen/arch/arm/arm32/head.S | 30 +++++++++++++++++-------------
>  1 file changed, 17 insertions(+), 13 deletions(-)
> 
> diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
> index 40c1d7502007..315abbbaebec 100644
> --- a/xen/arch/arm/arm32/head.S
> +++ b/xen/arch/arm/arm32/head.S
> @@ -66,6 +66,20 @@
>          add   \rb, \rb, r10
>  .endm
> 
> +/*
> + * Flush local TLBs
> + *
> + * @tmp:    Scratch register
As you are respinning a series anyway, could you add just one space after @tmp:?

~Michal



 


Rackspace

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