From patchwork Tue May 14 12:24:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 164188 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp2555261ili; Tue, 14 May 2019 05:26:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzitTr64acI81iBIjRvzUCuNXttHUCWFFJCdIqGe8SL4Idt3BGXc9fNAb9EikzI5Dl25b2O X-Received: by 2002:a05:660c:3c7:: with SMTP id c7mr2995120itl.2.1557836782292; Tue, 14 May 2019 05:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557836782; cv=none; d=google.com; s=arc-20160816; b=yEkFAH/w01aBzaM/aNDWDmAN1mYPgm7YLBqOD0HlJea8ZmlvJozlIu8qx+ac9ISw5k +aHDiM08mNO/uLpxMLmWOpxBYsQl65f2LtXREiIPvrg98OatNkQ3CZgN5uOOc5NSlsEJ H1312WkIh56Qk8NhTrLzAg7tZaVODrhD2ohD8Z36VXLAr6JAp1xv9AShSvSdwu9Dx/ua YAy4IJ1Z+gqCNROptCsCypqTHgQIrT3Liwd+AiRr4z+evvY4TJxR8YlT7pXu53pypEeE mm/COzS9WxZrDPmyQU9sEll3gCr1b3mQzEFvqLBR5wMDbBs58F+pzGOdcWUsfkwrql9w EpLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=nPABOQvlQbFcabCCgz8apQE2RJ6pWYm70CDrjaPFSPc=; b=TxKud/34Y7JcLgRSiykeGqEgpGIFn3I86SrFxOFwnjOxbFN1ESwR6HwQ5sq+cwKXHT ruoCAVrNEF7NdTW+gMdLLZ1Y0SBuTzIvCXlzUKVJcpMikMSs3e+bR8gRCS97u7IWRdJc CwgIJj+J1nueqHGp5iAeQV1/kzo/tV55gmUxmGYk1Dze0KaEvQnhiqPXzF2aDVG6j9jP f9xSZIXbHWpT+qLuGo2ppJXt3JfWFxAD2VluzQSHZNIgDKFgWqrJiov8jW/ZcfKbUvi8 QRTG60t+FXt/XBTw1Nv+VGzTx5RqfsyMyhZulMXr0++gE5mxdONbL9k2jdndrcThFAER K4mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id f5si1525740itk.14.2019.05.14.05.26.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 May 2019 05:26:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQWUn-0002rC-6J; Tue, 14 May 2019 12:25:25 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQWUk-0002nC-W8 for xen-devel@lists.xenproject.org; Tue, 14 May 2019 12:25:23 +0000 X-Inumbo-ID: 57becc0b-7643-11e9-8980-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 57becc0b-7643-11e9-8980-bc764e045a96; Tue, 14 May 2019 12:25:21 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BB294341; Tue, 14 May 2019 05:25:21 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 881E43F71E; Tue, 14 May 2019 05:25:20 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 14 May 2019 13:24:50 +0100 Message-Id: <20190514122456.28559-14-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190514122456.28559-1-julien.grall@arm.com> References: <20190514122456.28559-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH MM-PART2 RESEND v2 13/19] xen/arm32: mm: Avoid to zero and clean cache for CPU0 domheap X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Oleksandr_Tyshchenko@epam.com, Julien Grall , Stefano Stabellini , Andrii Anisov MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The page-table walker is configured to use the same shareability and cacheability as the access performed when updating the page-tables. This means cleaning the cache for CPU0 domheap is unnecessary. Furthermore, CPU0 page-tables are part of Xen binary and will already be zeroed before been used. So it is pointless to zero the domheap again. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov Reviewed-by: Stefano Stabellini --- Changes in v2: - Tweak a bit the commit message - Add Andrii's reviewed-by --- xen/arch/arm/mm.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index e090afb976..cda2847d00 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -724,11 +724,6 @@ void __init setup_pagetables(unsigned long boot_phys_offset) #ifdef CONFIG_ARM_32 per_cpu(xen_pgtable, 0) = cpu0_pgtable; per_cpu(xen_dommap, 0) = cpu0_dommap; - - /* Make sure it is clear */ - memset(this_cpu(xen_dommap), 0, DOMHEAP_SECOND_PAGES*PAGE_SIZE); - clean_dcache_va_range(this_cpu(xen_dommap), - DOMHEAP_SECOND_PAGES*PAGE_SIZE); #endif }