From patchwork Sun May 27 13:49:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 921138 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40v2bx1GLsz9s0q for ; Mon, 28 May 2018 00:36:13 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="yeiTMYE8"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40v2bw6l7wzF0S4 for ; Mon, 28 May 2018 00:36:12 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="yeiTMYE8"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40v1c02JRwzDr4g for ; Sun, 27 May 2018 23:51:12 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="yeiTMYE8"; dkim-atps=neutral Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by bilbo.ozlabs.org (Postfix) with ESMTP id 40v1bz6XkJz8vHp for ; Sun, 27 May 2018 23:51:11 +1000 (AEST) Received: by ozlabs.org (Postfix) id 40v1bz4h8nz9s23; Sun, 27 May 2018 23:51:11 +1000 (AEST) Delivered-To: linuxppc-dev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=srs0=ri55=io=linuxfoundation.org=gregkh@kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="yeiTMYE8"; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40v1by6xsGz9s02 for ; Sun, 27 May 2018 23:51:10 +1000 (AEST) Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 ED2D720844; Sun, 27 May 2018 13:51:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527429069; bh=Tm4439aKL/17k7WyyeLnc75eA/gld4Lrgg/0wx+J9xM=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=yeiTMYE8Mp2HyyzKnuc+ksrGTAdMvsoBFtcxSqP86fFl13xUSeZvfjWpVN7YDMQtm saG8OufAjnUnnPiBxmCdaywLEn3CKz4DvYkud7Sm2oxNC5SR1nBnxvyj0crYQujbl+ IHs3qfUL+X65qP0WAsnfu2KKa+RyQNgpwWDQAil8= Subject: Patch "powerpc/rfi-flush: Always enable fallback flush on pseries" has been added to the 4.14-stable tree To: greg@kroah.com, gregkh@linuxfoundation.org, linuxppc-dev@ozlabs.org, mauricfo@linux.vnet.ibm.com, mpe@ellerman.id.au, tglx@linutronix.de From: Date: Sun, 27 May 2018 15:49:54 +0200 In-Reply-To: <20180526042749.5324-7-mpe@ellerman.id.au> Message-ID: <1527428994192202@kroah.com> MIME-Version: 1.0 X-stable: commit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stable-commits@vger.kernel.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This is a note to let you know that I've just added the patch titled powerpc/rfi-flush: Always enable fallback flush on pseries to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: powerpc-rfi-flush-always-enable-fallback-flush-on-pseries.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. From foo@baz Sun May 27 15:47:18 CEST 2018 From: Michael Ellerman Date: Sat, 26 May 2018 14:27:32 +1000 Subject: powerpc/rfi-flush: Always enable fallback flush on pseries To: greg@kroah.com Cc: stable@vger.kernel.org, tglx@linutronix.de, linuxppc-dev@ozlabs.org Message-ID: <20180526042749.5324-7-mpe@ellerman.id.au> From: Michael Ellerman commit 84749a58b6e382f109abf1e734bc4dd43c2c25bb upstream. This ensures the fallback flush area is always allocated on pseries, so in case a LPAR is migrated from a patched to an unpatched system, it is possible to enable the fallback flush in the target system. Signed-off-by: Michael Ellerman Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/platforms/pseries/setup.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) Patches currently in stable-queue which might be from mpe@ellerman.id.au are queue-4.14/powerpc-64s-clear-pcr-on-boot.patch queue-4.14/powerpc-rfi-flush-differentiate-enabled-and-patched-flush-types.patch queue-4.14/powerpc-64s-fix-section-mismatch-warnings-from-setup_rfi_flush.patch queue-4.14/powerpc-pseries-fix-clearing-of-security-feature-flags.patch queue-4.14/powerpc-powernv-set-or-clear-security-feature-flags.patch queue-4.14/powerpc-64s-move-cpu_show_meltdown.patch queue-4.14/powerpc-rfi-flush-call-setup_rfi_flush-after-lpm-migration.patch queue-4.14/powerpc-pseries-set-or-clear-security-feature-flags.patch queue-4.14/powerpc-rfi-flush-make-it-possible-to-call-setup_rfi_flush-again.patch queue-4.14/powerpc-move-default-security-feature-flags.patch queue-4.14/powerpc-powernv-use-the-security-flags-in-pnv_setup_rfi_flush.patch queue-4.14/powerpc-add-security-feature-flags-for-spectre-meltdown.patch queue-4.14/powerpc-pseries-use-the-security-flags-in-pseries_setup_rfi_flush.patch queue-4.14/powerpc-64s-enhance-the-information-in-cpu_show_meltdown.patch queue-4.14/powerpc-64s-improve-rfi-l1-d-cache-flush-fallback.patch queue-4.14/powerpc-rfi-flush-always-enable-fallback-flush-on-pseries.patch queue-4.14/powerpc-rfi-flush-move-the-logic-to-avoid-a-redo-into-the-debugfs-code.patch queue-4.14/powerpc-pseries-restore-default-security-feature-flags-on-setup.patch queue-4.14/powerpc-pseries-add-new-h_get_cpu_characteristics-flags.patch queue-4.14/powerpc-64s-add-support-for-a-store-forwarding-barrier-at-kernel-entry-exit.patch queue-4.14/powerpc-64s-wire-up-cpu_show_spectre_v1.patch queue-4.14/powerpc-powernv-support-firmware-disable-of-rfi-flush.patch queue-4.14/powerpc-pseries-support-firmware-disable-of-rfi-flush.patch queue-4.14/powerpc-64s-wire-up-cpu_show_spectre_v2.patch --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -468,26 +468,18 @@ static void pseries_setup_rfi_flush(void /* Enable by default */ enable = true; + types = L1D_FLUSH_FALLBACK; rc = plpar_get_cpu_characteristics(&result); if (rc == H_SUCCESS) { - types = L1D_FLUSH_NONE; - if (result.character & H_CPU_CHAR_L1D_FLUSH_TRIG2) types |= L1D_FLUSH_MTTRIG; if (result.character & H_CPU_CHAR_L1D_FLUSH_ORI30) types |= L1D_FLUSH_ORI; - /* Use fallback if nothing set in hcall */ - if (types == L1D_FLUSH_NONE) - types = L1D_FLUSH_FALLBACK; - if ((!(result.behaviour & H_CPU_BEHAV_L1D_FLUSH_PR)) || (!(result.behaviour & H_CPU_BEHAV_FAVOUR_SECURITY))) enable = false; - } else { - /* Default to fallback if case hcall is not available */ - types = L1D_FLUSH_FALLBACK; } setup_rfi_flush(types, enable);