From patchwork Wed Nov 13 17:22:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Price X-Patchwork-Id: 11242361 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3146814E5 for ; Wed, 13 Nov 2019 17:23:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D821B206E1 for ; Wed, 13 Nov 2019 17:23:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Bo/caW8Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D821B206E1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7JC+pMux3O8LXUzx5T9jbk5OLdWxCMiUetz4/Ol0jbA=; b=Bo/caW8ZKOTiF7 DcO70uQqykylvd57U4dL8tDGVAfee0vVJmP+Us5ra+Vq8Nd7ZSxUvxaU2ucNChXq/BYg2Vppa4Ea8 EGFF9Nr3CSsihK0OCZhrgZzBh7+dp2Xr/2BdUyIbKeou4OI/lV4JwUTYcy1clsb6V8vVuKWWTJSZF OTlnxEU1RjZ4gG0iVxbOgyupoDiV83xks+dhhw7XCEX9e8NUVdNsZb0OLKARAIkqZ2fTeAYeuqoLT XX/Lz8qo97wHg8rC3hSzCkiid/xw8nrZtICQ7GkpOSg+WpEolLsXp1+OgBxrHZ6sQNEQrN+Nrdcsw 1bYyAx+03DSmI0w7T0Hg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUwMD-0004xZ-TW; Wed, 13 Nov 2019 17:23:05 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUwMB-0004wM-CL for linux-arm-kernel@lists.infradead.org; Wed, 13 Nov 2019 17:23:04 +0000 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 A2B2830E; Wed, 13 Nov 2019 09:23:01 -0800 (PST) Received: from e112269-lin.cambridge.arm.com (e112269-lin.cambridge.arm.com [10.1.194.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4BACF3F534; Wed, 13 Nov 2019 09:23:00 -0800 (PST) From: Steven Price To: Catalin Marinas , Marc Zyngier , Will Deacon Subject: [PATCH v3 0/3] arm64: Workaround for Cortex-A55 erratum 1530923 Date: Wed, 13 Nov 2019 17:22:49 +0000 Message-Id: <20191113172252.12610-1-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191113_092303_463934_AD4B828C X-CRM114-Status: GOOD ( 11.49 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Suzuki K Poulose , linux-kernel@vger.kernel.org, Steven Price , James Morse , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Julien Thierry Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Version 3 and I'm up to 3 patches - let's hope it doesn't continue to grow... ;) This series enables a workaround for Cortex-A55 erratum 1530923. The erratum potentially allows TLB entries to be allocated as a result of a speculative AT instruction. This may happen in the middle of a guest world switch while the relevant VMSA configuration is in an inconsistent state, leading to erroneous content being allocated into TLBs. There are existing workarounds for similar issues, 1165522 is effectively the same, and 1319367/1319537 is similar but without VHE support. Rather than add to the selection of errata, the first patch renames 1165522 to WORKAROUND_SPECULATIVE_AT which can be reused (in the final patch) for 1530923. The workaround for errata 1319367 and 1319537 although similar cannot use VHE (not available on those CPUs) so cannot share the workaround. However, to keep some sense of symmetry the workaround is renamed to SPECULATIVE_AT_NVHE. Changes since v2: * Split 1319367/1319537 back into their own workaround, but rename it for symmetry with the VHE workaround. Changes since v1: * Combine 1319367/1319537 into the same 'SPECULATIVE_AT' workaround. Steven Price (3): arm64: Rename WORKAROUND_1165522 to SPECULATIVE_AT_VHE arm64: Rename WORKAROUND_1319367 to SPECULATIVE_AT_NVHE arm64: Workaround for Cortex-A55 erratum 1530923 Documentation/arm64/silicon-errata.rst | 2 ++ arch/arm64/Kconfig | 21 +++++++++++++++++++++ arch/arm64/include/asm/cpucaps.h | 4 ++-- arch/arm64/include/asm/kvm_host.h | 2 +- arch/arm64/include/asm/kvm_hyp.h | 6 +++--- arch/arm64/kernel/cpu_errata.c | 25 +++++++++++++++++++------ arch/arm64/kvm/hyp/switch.c | 10 +++++----- arch/arm64/kvm/hyp/sysreg-sr.c | 4 ++-- arch/arm64/kvm/hyp/tlb.c | 12 ++++++------ 9 files changed, 61 insertions(+), 25 deletions(-)