Skip to content

Commit fc57b89

Browse files
committed
powerpc/powernv: Get L1D flush requirements from device-tree
jira LE-1907 Rebuild_History Non-Buildable kernel-rt-5.14.0-284.30.1.rt14.315.el9_2 commit-author Russell Currey <ruscur@russell.cc> commit 2efee6a The device-tree properties no-need-l1d-flush-msr-pr-1-to-0 and no-need-l1d-flush-kernel-on-user-access are the equivalents of H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY and H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS from the H_GET_CPU_CHARACTERISTICS hcall on pseries respectively. In commit d02fa40 ("powerpc/powernv: Remove POWER9 PVR version check for entry and uaccess flushes") the condition for disabling the L1D flush on kernel entry and user access was changed from any non-P9 CPU to only checking P7 and P8. Without the appropriate device-tree checks for newer processors on powernv, these flushes are unnecessarily enabled on those systems. This patch corrects this. Fixes: d02fa40 ("powerpc/powernv: Remove POWER9 PVR version check for entry and uaccess flushes") Reported-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220404101536.104794-1-ruscur@russell.cc (cherry picked from commit 2efee6a) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 809af4e commit fc57b89

File tree

1 file changed

+6
-0
lines changed
  • arch/powerpc/platforms/powernv

1 file changed

+6
-0
lines changed

arch/powerpc/platforms/powernv/setup.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ static void init_fw_feat_flags(struct device_node *np)
9696

9797
if (fw_feature_is("disabled", "needs-spec-barrier-for-bound-checks", np))
9898
security_ftr_clear(SEC_FTR_BNDS_CHK_SPEC_BAR);
99+
100+
if (fw_feature_is("enabled", "no-need-l1d-flush-msr-pr-1-to-0", np))
101+
security_ftr_clear(SEC_FTR_L1D_FLUSH_ENTRY);
102+
103+
if (fw_feature_is("enabled", "no-need-l1d-flush-kernel-on-user-access", np))
104+
security_ftr_clear(SEC_FTR_L1D_FLUSH_UACCESS);
99105
}
100106

101107
static void pnv_setup_security_mitigations(void)

0 commit comments

Comments
 (0)