Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp243056pxx; Wed, 28 Oct 2020 03:55:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKDG25vAPAUjFSkPz5dDBCGa0cazDOJ3WVyE3zMhw8u3Iel2qgZpPPVN3XrlHOhVz/a74q X-Received: by 2002:a50:9e0b:: with SMTP id z11mr7346792ede.341.1603882532305; Wed, 28 Oct 2020 03:55:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603882532; cv=none; d=google.com; s=arc-20160816; b=fWEyONXDHRKi3Qgny3w2Phw4Ljmwp9yG1XA/8bjJnyxCiDCMMgfgrS+iEJF2m3kOfi zFeR2tuZ/4CzOggUCj57xop6KsKtuM5p7brGa3wFpWba3PuZc5HhE1mC8rEQVQWXZSUF 2JuINbF05HSciafKnvt+AocJZNW3J9hDNu5R0FkawJelF7L5KOfLbpw+GWdCeVGZeTVR CEx2kC4MHeO3VNEosCSyz4H2vwETa6u/J90yMqEL6l/ZKgiqZJ2Y8IxeB8y9WfAViqfP eoCgLbp75oxb5OmIYDFfuPns935/bx6Rj2ZWi1pbWOi7+M/h4TQ+mW4OQZhIPvpI93WR YZwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6GP4VbVHiRsVSzONtsiditAYM1pTJ/SfKtaSfMSk7S0=; b=H189W5W7107/831I7RyDuqIx9oDRwV0NcLqHDv+p73xZH7XG5OD0V4i3kpO4NWOFl2 Vp6sMh+3rOctVimqJDxEsch0nn7/YWDihQ3eW38Dh/jhEN7g4oGpPurhjiUaY4zQiM19 b0kvtrgHP3rsWX9ITUPvaV97EDVd7/6EZ2C2kObqpMnNnYOt12iQBYynL9OMRvGGBhZI U0PmpoKLHHIUxr4c8ybsha79nCdxwv7A3rFYW7jjf0fVR6givSxQvuU7QTx6k4rNHxvF isxSzlTxwA5ijRB+Npenzz2VG6k2Fq5vDAFwbC9mlhcelwSZfkOJHVv1NCa268FG93QK xGxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qLjfGubC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p90si2749641edd.284.2020.10.28.03.55.10; Wed, 28 Oct 2020 03:55:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qLjfGubC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752434AbgJ0O4W (ORCPT + 99 others); Tue, 27 Oct 2020 10:56:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:50246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1772941AbgJ0Oui (ORCPT ); Tue, 27 Oct 2020 10:50:38 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E8F8207DE; Tue, 27 Oct 2020 14:50:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810236; bh=WehOnmvMEltJu9ZF5Z1xoC8xUIS8r926y7Ds5a440hM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qLjfGubCDErUfw/ZE9vFoiTIrj+ytUPQbt46VbxIGXNJwWqvmTUiDoiorDHf47O9P kqOMNCeKinDuCzsWsmioHP/xgJBlRdtgzBV0afILYkFNxO/GS7xeIWlx8OaytZ9z+g vX8ymJwKmLkOL1eNdtuCk0Ye2BtEAoUecJrvjS1Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Zyngier , Will Deacon Subject: [PATCH 5.8 068/633] arm64: Make use of ARCH_WORKAROUND_1 even when KVM is not enabled Date: Tue, 27 Oct 2020 14:46:51 +0100 Message-Id: <20201027135525.888705944@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marc Zyngier commit b11483ef5a502663732c6ca1b58d14ff9eedd6f7 upstream. We seem to be pretending that we don't have any firmware mitigation when KVM is not compiled in, which is not quite expected. Bring back the mitigation in this case. Fixes: 4db61fef16a1 ("arm64: kvm: Modernize __smccc_workaround_1_smc_start annotations") Cc: Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/cpu_errata.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -234,14 +234,17 @@ static int detect_harden_bp_fw(void) smccc_end = NULL; break; -#if IS_ENABLED(CONFIG_KVM) case SMCCC_CONDUIT_SMC: cb = call_smc_arch_workaround_1; +#if IS_ENABLED(CONFIG_KVM) smccc_start = __smccc_workaround_1_smc; smccc_end = __smccc_workaround_1_smc + __SMCCC_WORKAROUND_1_SMC_SZ; - break; +#else + smccc_start = NULL; + smccc_end = NULL; #endif + break; default: return -1;