From patchwork Tue May 14 12:21:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 164150 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp2552166ili; Tue, 14 May 2019 05:23:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWXb/vu5YuXkI2oi/0dL8MfdPbbO7YlG8fHv0RHMNm2LGGmQnIj0nVSnpWzNWbEhix+U08 X-Received: by 2002:a24:4453:: with SMTP id o80mr3174083ita.160.1557836592360; Tue, 14 May 2019 05:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557836592; cv=none; d=google.com; s=arc-20160816; b=oIqtv4Bx8xmGIoTS/jfJgJz8Fl+yGdWhrqiEfMlg2nGjeAkmOO+JrMawFSXuGlm0Y6 PfKlxWkCMfjKRxTpoeFiUY4kdf65b52ZtTEGkTHZa+U76MaFTgjwb/GUJYoyKM/9sTYV jZVYF8+Nh/7LmkkROSOW7zqcFcfpUTLyF4xkmt+iQycZQbsHDw0/jg5epnWro5CXNu8I O03n+fTcBseQN/WNi67DT0q/KP11pQ51n5bPFYBL7aOkNics30GTcXbLYATXaOE2LIXZ 3rdh7LgQfvjOuFCg0LQFmuStw8ySIaSQxoqL+hB1wiERr61Jg2ymiiS+4OwzHVcFvQhl ZcIQ== 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=XtdAqtDDn2uRbz0wnO3YJQ3bZA1zvo6O/P5Kebk/oeaxhxSZMdADJHASOaYpD/EWqM /m6qfu6L5D/PZP7Olyi7C4h+vKSQGEGHmbhrNIWE8ycNU5HRp9bqB16j/Mn23BNbl+yh OrIP5ot1J9a6tXgL6BGPXTFhMOZarO3SV9Mq/PItg49PNG3EJfGQDdTpYDg7GfRKTb9k FZR1bW4oIKSAM7mS0fuPQm2yKiO8M9JABB2nC+Md/9rzr0IjNJ83sogam7BrcWlpWttA fuEXPnLHUS+5O46ECYvS2aBHF5rIEAYjhtlanxreeNJpFkfkp3M9WwVJeUnocQd97g8C g0dA== 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 i12si10227368jak.18.2019.05.14.05.23.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 May 2019 05:23:12 -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 1hQWRk-0000Eo-L6; Tue, 14 May 2019 12:22:16 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQWRj-0000CN-Li for xen-devel@lists.xenproject.org; Tue, 14 May 2019 12:22:15 +0000 X-Inumbo-ID: e81f2f19-7642-11e9-8980-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id e81f2f19-7642-11e9-8980-bc764e045a96; Tue, 14 May 2019 12:22:14 +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 6FB7C341; Tue, 14 May 2019 05:22:14 -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 3CBD03F71E; Tue, 14 May 2019 05:22:13 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 14 May 2019 13:21:30 +0100 Message-Id: <20190514122136.28215-22-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190514122136.28215-1-julien.grall@arm.com> References: <20190514122136.28215-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH MM-PART2 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 --- 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 }