From patchwork Tue Sep 24 11:07:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 174264 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3992945ill; Tue, 24 Sep 2019 04:11:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWLln3ae6yjZZWsYqaNmnqbX1SI403XDst43JzCvrFBNlgcRGhW504b/2QtvVvrgUTd3b9 X-Received: by 2002:a6b:6613:: with SMTP id a19mr2902823ioc.241.1569323500589; Tue, 24 Sep 2019 04:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569323500; cv=none; d=google.com; s=arc-20160816; b=Mfk67cl4KYzWgs34cull0v4024zIIyUC1/RPNQcQD9Rw0mY0UqX6Rz/3EVpL35xp2F ur3pdnleLO1kf0GIDpFf6XGeiRgI/1yEywfXpNqjQgecMptpbzrBIJ2fU89jBq6c9ru5 jy4NhQ2EHP6emtLUNU81tuvmDIolhkHYgt7wHDX+3nxarm1D+rfv/ztyCBFOIRAggzRp Iy8mpWX3I3bL96BLXeC2ba1ZGdS1SHvXwUCg4yttz8XjsfOxfoLuAorxEG0PBvMHdKWo RaPYiSbGyO5Rq37tfNyUmIWcIegm6bfkhq4VK+aYC9PXdKS9aSmca6xTn2E5lRIdESM/ wWPw== 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:message-id:date:to:from; bh=KMzOjks5ISm6Up1mSEGiSgQ8MW9P4LJzbPN2BoMDyiI=; b=dg7roVqT8MfNWf3Lu8cwbX/bAysiintO5VK7zv6/cmG7MgQeOGk+DUUSPw0BvVq/B9 3Clm/3xUDzL80v3BAzmy0bBJuLqiyMyTEBGKx1Kc6jy4zUZxvEPqMCU/oj/OeniPwvr7 aaKxQCnXT5m3iHOwC95eUSiGTybsWSsCUrB/am44Vv/KYYvOn4lN4kEw/g8IfejTtR7D vQUrD1jRWeW62e5/kOR8TvRQ7iCLWy343iQHvQgqZd1oH+qAcJtAizNBAKmyiLrM2eIY NfkQLXXPnLpJbP8GtnAaSUb/Qy/yETXTau8tjjkjuV7If2LS3Zu0NFRJBK2HIgMx0TBL t/zw== 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 z12si1842275iop.117.2019.09.24.04.11.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Sep 2019 04:11:40 -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 1iCii8-0004b3-IB; Tue, 24 Sep 2019 11:10:24 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iCii6-0004Zl-Ln for xen-devel@lists.xenproject.org; Tue, 24 Sep 2019 11:10:22 +0000 X-Inumbo-ID: 8e72795a-debb-11e9-994c-bc764e2007e4 Received: from foss.arm.com (unknown [217.140.110.172]) by localhost (Halon) with ESMTP id 8e72795a-debb-11e9-994c-bc764e2007e4; Tue, 24 Sep 2019 11:07:54 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BD22F142F; Tue, 24 Sep 2019 04:07:53 -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 164183F67D; Tue, 24 Sep 2019 04:07:52 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 24 Sep 2019 12:07:49 +0100 Message-Id: <20190924110749.18210-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 Subject: [Xen-devel] [PATCH for-4.13] xen/arm: Implement workaround for Cortex A-57 and Cortex A72 AT speculate 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: Julien Grall , Stefano Stabellini , Volodymyr Babchuk MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Both Cortex-A57 (erratum 1319537) and Cortex-A72 (erratum 1319367) can end with corrupt TLBs if they speculate an AT instruction while S1/S2 system registers in inconsistent state. The workaround is the same as for Cortex A-76 implemented by commit a18be06aca "xen/arm: Implement workaround for Cortex-A76 erratum 1165522", so it is only necessary to plumb in the cpuerrata framework. Signed-off-by: Julien Grall Reviewed-by: Volodymyr Babchuk --- docs/misc/arm/silicon-errata.txt | 2 ++ xen/arch/arm/cpuerrata.c | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/docs/misc/arm/silicon-errata.txt b/docs/misc/arm/silicon-errata.txt index 6cd1366f15..cf193a6d4d 100644 --- a/docs/misc/arm/silicon-errata.txt +++ b/docs/misc/arm/silicon-errata.txt @@ -48,5 +48,7 @@ stable hypervisors. | ARM | Cortex-A57 | #852523 | N/A | | ARM | Cortex-A57 | #832075 | ARM64_ERRATUM_832075 | | ARM | Cortex-A57 | #834220 | ARM64_ERRATUM_834220 | +| ARM | Cortex-A57 | #1319537 | N/A +| ARM | Cortex-A72 | #1319367 | N/A | ARM | Cortex-A76 | #1165522 | N/A | | ARM | MMU-500 | #842869 | N/A | diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c index 6f483b2d8d..da72b02442 100644 --- a/xen/arch/arm/cpuerrata.c +++ b/xen/arch/arm/cpuerrata.c @@ -481,6 +481,16 @@ static const struct arm_cpu_capabilities arm_errata[] = { .capability = ARM64_WORKAROUND_AT_SPECULATE, MIDR_RANGE(MIDR_CORTEX_A76, 0, 2 << MIDR_VARIANT_SHIFT), }, + { + .desc = "ARM erratum 1319537", + .capability = ARM64_WORKAROUND_AT_SPECULATE, + MIDR_ALL_VERSIONS(MIDR_CORTEX_A72), + }, + { + .desc = "ARM erratum 1319367", + .capability = ARM64_WORKAROUND_AT_SPECULATE, + MIDR_ALL_VERSIONS(MIDR_CORTEX_A57), + }, {}, };