From patchwork Mon Jan 28 11:50:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 156719 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3333339jaa; Mon, 28 Jan 2019 03:52:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IYid0cjYBh3qzZZy5C/zTuPRWWEpE6jr0/6naKJLwTHPGHrZhI4+3S3ORC26BkqQovmvqnP X-Received: by 2002:a5b:2cc:: with SMTP id h12mr712531ybp.60.1548676351954; Mon, 28 Jan 2019 03:52:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548676351; cv=none; d=google.com; s=arc-20160816; b=GNetAGo+Sh3vqYrqVqBqHOQ97Z3GA1OpbJ0gpKmtG67tSOhgoW9gebvo14qquNGyOu bysI4rMnceb5hdJS1AFvFsRj3oBUHJ/3OY3prJF5P3+Z4b6xOAEEuU69WJY/NO6TrWzX /zkTem++sj0tA2raBCZ/HwBQ1siI1HQImH5OzOU9t9ihVp4HFvvBGellJka9gGRi0m4d wwn0LCasHp5Tx76kjcY3/eBo9vo99z4nrbnRvsygx+ni+rqcaZe/vRpulYMUjKPk/ZCi /PXiKEzJaYQFDFBM9pwL/wGZwiedSziSp3Sd7W+9RcPZG8wCyXBio+3mM/MQ6a+l3mdK 9lxA== 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=7anThPdZCxopA4TEFJsi3ItyGNoPEawTi5shtSmd/28=; b=du+e8+cW8QwJQCJ73bSHIXTn8ENoHumn0xMz9FHIoHr8YgNoy8Jqt9URWnzXJdE+eB ZAcBrNXCDHupa3ENHbsT3b/YAKM1XK2SiRGwcYzQ8Vexovl+3IoNnTDVWtfKpM5DnTFt /u7TtLF/T202zCNLO2EfolMWHoHj3ReWkrWyUnOjQIAQ9jCyKVrcNH8tNw3ZCRZS5TC5 6R+h7wTRPqcABMYFtUHhnTfliMWnlfgfhGBDQtRs3fdSDHv/L/YDwDIS7DsjquFKWSg2 30M0hfutApGQOLE57LVnHaLUdHL4XnNPdmsauvOkrZcXvUvqbYbPjuJF2b9B6X+z3RjT zYbQ== 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 u7si20201960ywi.140.2019.01.28.03.52.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 03:52:31 -0800 (PST) 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 1go5Qx-00034g-VJ; Mon, 28 Jan 2019 11:50:35 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1go5Qw-00034P-Gh for xen-devel@lists.xenproject.org; Mon, 28 Jan 2019 11:50:34 +0000 X-Inumbo-ID: eaa77a34-22f2-11e9-a0f9-7b8252285022 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id eaa77a34-22f2-11e9-a0f9-7b8252285022; Mon, 28 Jan 2019 11:50:32 +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 2B86AEBD; Mon, 28 Jan 2019 03:50:32 -0800 (PST) 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 3F2B83F59C; Mon, 28 Jan 2019 03:50:31 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 28 Jan 2019 11:50:19 +0000 Message-Id: <20190128115026.3336-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 Subject: [Xen-devel] [PATCH for-4.12 v2 0/7] xen/arm: Workaround for Cortex-A76 erratum 1165522 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: jgross@suse.com, Julien Grall , sstabellini@kernel.org MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Hi all, Early version of Cortex-A76 can end-up with corrupt TLBs if they speculate an AT instruction while the S1/S2 system registers are in an inconsistent state. This can happen during guest context switch and when invalidating the TLBs for other than the current VMID. The workaround implemented in Xen will: - Use an empty stage-2 with a reserved VMID while context switching between 2 guests - Use an empty stage-2 with the VMID where TLBs need to be flushed Cheers, CC: Julien Grall (7): xen/arm: Only set necessary flags when initializing HCR_EL2 xen/arm: p2m: Provide an helper to generate the VTTBR xen/arm: p2m: Introduce an helper to allocate the root page-table xen/arm: domain_build: Don't switch to the guest P2M when copying data xen/arm: p2m: Only use isb() when it is necessary xen/arm: Implement workaround for Cortex-A76 erratum 1165522 DO NOT APPLY Allow testing the new AT speculate workaround code docs/misc/arm/silicon-errata.txt | 1 + xen/arch/arm/cpuerrata.c | 16 ++++++ xen/arch/arm/domain.c | 8 ++- xen/arch/arm/domain_build.c | 13 ----- xen/arch/arm/p2m.c | 118 +++++++++++++++++++++++++++++++++++---- xen/arch/arm/traps.c | 8 ++- xen/include/asm-arm/cpufeature.h | 3 +- xen/include/asm-arm/processor.h | 2 + 8 files changed, 139 insertions(+), 30 deletions(-)