Received: by 10.223.185.116 with SMTP id b49csp1981715wrg; Mon, 12 Feb 2018 02:09:03 -0800 (PST) X-Google-Smtp-Source: AH8x225+nCOtaLoxi0D/sgoW2iaWzssVSRXpqb+A2cOT5G8UsM3eiFNBEN5OYTesZKXGzhE7nTIk X-Received: by 10.99.121.76 with SMTP id u73mr8927017pgc.154.1518430143319; Mon, 12 Feb 2018 02:09:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518430143; cv=none; d=google.com; s=arc-20160816; b=PpG4i4VEK/LqeqWA7evrRjYc6qxuy6nceqiZfMwn/0hJvbuhqXWbP4W1wgGL8CssSE S8Vi0ASrnkikOq9OFYV0Fst33OqN6U1SskFSdlPo4EWFvjbvThWAUgXsrTFvSGeWm3Ka K5pL+GmjewUuMI8SUswEgTFSBGRDZA2Lqqw7PxuThomvMdbKPF4EWSXd6svxrLnXMCwe gxZokI18VHwI0aywvnq8ehC+VQ3aZl8gBBVP2xxJfoFkaJixi+PpVi8KsaIJ7IEHrWOU hznVOJ2CY6xqAATN2Z/tkG8pmmyCmdSKhik8Kp7SuQnjPqpKrKOBr45TsUeC8tXKOBmi oPLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date :arc-authentication-results; bh=ZyK5zdKS4yFWZt9XNtFtnGnu7ThyEOBWvi1E4EQcoEo=; b=B8CsRGrhpO1Bxo2Sf3tpNLS2Lybc9AuVbg10awursEOaer2wq13SlqX2viE2eDpmwO ZOMYP5NRZxEDLbFuV0zE2/10BtHmfc9+vy8s0Z8lJs+z4ut3xHP7Jlp4KH7cxp0Wumud ikvvq4q5gCGJ399aDKYpJ8t6afF7Q0MyzZDvtB8iMBlMGuK2XDdnbgIHvPBZG0bTvfsn BlvWhg10hUFGWm64MiE8tvvfoiTpUc3uwrx5dChhdKmOS2gDmgKsfCnIbEE8Kamb/kZI s45wTJTOQgMn+ZOl9pzOmvHhzAH1j5BbNqF5lUu29g+dz2pzbbMTmJAbOiQbT+OADdtf a4Aw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l12-v6si3627300plc.262.2018.02.12.02.08.48; Mon, 12 Feb 2018 02:09:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932950AbeBLI63 (ORCPT + 99 others); Mon, 12 Feb 2018 03:58:29 -0500 Received: from foss.arm.com ([217.140.101.70]:37558 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932630AbeBLI62 (ORCPT ); Mon, 12 Feb 2018 03:58:28 -0500 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 496DB1529; Mon, 12 Feb 2018 00:58:28 -0800 (PST) Received: from big-swifty.misterjones.org (big-swifty.cambridge.arm.com [10.1.26.163]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3FB773F41F; Mon, 12 Feb 2018 00:57:57 -0800 (PST) Date: Mon, 12 Feb 2018 08:57:36 +0000 Message-ID: <86po5ah9fj.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Shanker Donthineni Cc: Will Deacon , Christoffer Dall , linux-kernel , linux-arm-kernel , kvmarm , Paolo Bonzini , Catalin Marinas , Vikram Sethi , Sean Campbell , Thomas Speier Subject: Re: [PATCH] arm64: Add missing Falkor part number for branch predictor hardening In-Reply-To: <1518398175-28378-1-git-send-email-shankerd@codeaurora.org> References: <1518398175-28378-1-git-send-email-shankerd@codeaurora.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Feb 2018 01:16:15 +0000, Shanker Donthineni wrote: > > References to CPU part number MIDR_QCOM_FALKOR were dropped from the > mailing list patch due to mainline/arm64 branch dependency. So this > patch adds the missing part number. > > Fixes: ec82b567a74f ("arm64: Implement branch predictor hardening for Falkor") > Signed-off-by: Shanker Donthineni > --- > arch/arm64/kernel/cpu_errata.c | 9 +++++++++ > arch/arm64/kvm/hyp/switch.c | 4 +++- > 2 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c > index 0782359..52f15cd 100644 > --- a/arch/arm64/kernel/cpu_errata.c > +++ b/arch/arm64/kernel/cpu_errata.c > @@ -408,6 +408,15 @@ static int qcom_enable_link_stack_sanitization(void *data) > }, > { > .capability = ARM64_HARDEN_BRANCH_PREDICTOR, > + MIDR_ALL_VERSIONS(MIDR_QCOM_FALKOR), > + .enable = qcom_enable_link_stack_sanitization, > + }, > + { > + .capability = ARM64_HARDEN_BP_POST_GUEST_EXIT, > + MIDR_ALL_VERSIONS(MIDR_QCOM_FALKOR), > + }, > + { > + .capability = ARM64_HARDEN_BRANCH_PREDICTOR, > MIDR_ALL_VERSIONS(MIDR_BRCM_VULCAN), > .enable = enable_smccc_arch_workaround_1, > }, > diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c > index 116252a8..870f4b1 100644 > --- a/arch/arm64/kvm/hyp/switch.c > +++ b/arch/arm64/kvm/hyp/switch.c > @@ -407,8 +407,10 @@ int __hyp_text __kvm_vcpu_run(struct kvm_vcpu *vcpu) > u32 midr = read_cpuid_id(); > > /* Apply BTAC predictors mitigation to all Falkor chips */ > - if ((midr & MIDR_CPU_MODEL_MASK) == MIDR_QCOM_FALKOR_V1) > + if (((midr & MIDR_CPU_MODEL_MASK) == MIDR_QCOM_FALKOR) || > + ((midr & MIDR_CPU_MODEL_MASK) == MIDR_QCOM_FALKOR_V1)) { > __qcom_hyp_sanitize_btac_predictors(); > + } > } > > fp_enabled = __fpsimd_enabled(); Acked-by: Marc Zyngier I'd suggest this goes via the arm64 tree as a matter of consistency with the rest of the variant-2 series. Thanks, M. -- Jazz is not dead, it just smell funny.