From patchwork Wed Sep 21 14:52:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 76692 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp2092999qgf; Wed, 21 Sep 2016 07:54:18 -0700 (PDT) X-Received: by 10.107.201.78 with SMTP id z75mr32775615iof.202.1474469658728; Wed, 21 Sep 2016 07:54:18 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 137si40063829itv.63.2016.09.21.07.54.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Sep 2016 07:54:18 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmisr-0005yU-DF; Wed, 21 Sep 2016 14:52:25 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmisq-0005yO-Bq for xen-devel@lists.xen.org; Wed, 21 Sep 2016 14:52:24 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 0A/FE-06162-7AE92E75; Wed, 21 Sep 2016 14:52:23 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFLMWRWlGSWpSXmKPExsVysyfVTXfJvEf hBh9PGFks+biYxYHR4+ju30wBjFGsmXlJ+RUJrBmr155lKzjGVvFz2yG2Bsa9rF2MnBxCApsY JY62iHcxcgHZpxklvs1YxgiSYBPQlLjz+RMTiC0iIC1x7fNlsDizQKTEk5k3mEFsYYEYiR+Pj 7CD2CwCqhKHn04Hi/MKuEi8XTCHDcSWEJCTOHlsMusERs4FjAyrGDWKU4vKUot0jSz1kooy0z NKchMzc3QNDYz1clOLixPTU3MSk4r1kvNzNzEC/VXPwMC4g7Fpr98hRkkOJiVR3ueOj8KF+JL yUyozEosz4otKc1KLDzHKcHAoSfBWzgXKCRalpqdWpGXmAAMHJi3BwaMkwvt1DlCat7ggMbc4 Mx0idYpRl2PBj9trmYRY8vLzUqXEeeeBzBAAKcoozYMbAQviS4yyUsK8jAwMDEI8BalFuZklq PKvGMU5GJWEeZtBpvBk5pXAbXoFdAQT0BFbfj4AOaIkESEl1cBY++BEOsNBrulfI/4atO0+q9 /63nfLxXBjz55577P1Dk9etWtq/lmtjJY7lzZP5cn78lKyoYrNdhfX9n+p96ptzyrOT6/J25W hlXb7wN55JquPyU5reXnW62/ao0iBjawrDs6bG/Vvu8HD/9Fq6uJVfcfunsv4mrjMgy0nie/w gvknLbNO7n03Q4mlOCPRUIu5qDgRAPSk2+hdAgAA X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-4.tower-31.messagelabs.com!1474469540!6574476!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 15589 invoked from network); 21 Sep 2016 14:52:20 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-4.tower-31.messagelabs.com with SMTP; 21 Sep 2016 14:52:20 -0000 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 7136214F; Wed, 21 Sep 2016 07:52:19 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.218.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B0CF33F251; Wed, 21 Sep 2016 07:52:18 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 21 Sep 2016 15:52:12 +0100 Message-Id: <1474469532-19204-1-git-send-email-julien.grall@arm.com> X-Mailer: git-send-email 1.9.1 Cc: Julien Grall , sstabellini@kernel.org Subject: [Xen-devel] [for-4.8][PATCH] xen/arm64: Add missing synchronization barrier in invalidate_cache X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" The invalidation of the instructions cache requires barriers to ensure the completion of the invalidation before continuing (see B2.3.4 in ARM DDI 0487A.j). This was overlooked in commit fb9d877 "xen/arm64: Add an helper to invalidate all instruction caches". Signed-off-by: Julien Grall --- xen/include/asm-arm/arm64/page.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h index 79ef7bd..23d7781 100644 --- a/xen/include/asm-arm/arm64/page.h +++ b/xen/include/asm-arm/arm64/page.h @@ -33,6 +33,8 @@ static inline void write_pte(lpae_t *p, lpae_t pte) static inline void invalidate_icache(void) { asm volatile ("ic ialluis"); + dsb(ish); /* Ensure completion of the flush I-cache */ + isb(); } /*