linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc/pseries: Support firmware disable of RFI flush
@ 2018-02-22 13:21 Michael Ellerman
  2018-02-22 13:21 ` [PATCH 2/2] powerpc/powernv: " Michael Ellerman
  2018-02-26  5:35 ` [1/2] powerpc/pseries: " Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Ellerman @ 2018-02-22 13:21 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: npiggin, mikey, oohall, linuxram, leitao, mauricfo

Some versions of firmware will have a setting that can be configured
to disable the RFI flush, add support for it.

Fixes: 8989d56878a7 ("powerpc/pseries: Query hypervisor for RFI flush settings")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/pseries/setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 372d7ada1a0c..1a527625acf7 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -482,7 +482,8 @@ static void pseries_setup_rfi_flush(void)
 		if (types == L1D_FLUSH_NONE)
 			types = L1D_FLUSH_FALLBACK;
 
-		if (!(result.behaviour & H_CPU_BEHAV_L1D_FLUSH_PR))
+		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 */
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] powerpc/powernv: Support firmware disable of RFI flush
  2018-02-22 13:21 [PATCH 1/2] powerpc/pseries: Support firmware disable of RFI flush Michael Ellerman
@ 2018-02-22 13:21 ` Michael Ellerman
  2018-02-26  5:35   ` [2/2] " Michael Ellerman
  2018-02-26  5:35 ` [1/2] powerpc/pseries: " Michael Ellerman
  1 sibling, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2018-02-22 13:21 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: npiggin, mikey, oohall, linuxram, leitao, mauricfo

Some versions of firmware will have a setting that can be configured
to disable the RFI flush, add support for it.

Fixes: 6e032b350cd1 ("powerpc/powernv: Check device-tree for RFI flush settings")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/powernv/setup.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index 4fb21e17504a..092715b9674b 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -80,6 +80,10 @@ static void pnv_setup_rfi_flush(void)
 		if (np && of_property_read_bool(np, "disabled"))
 			enable--;
 
+		np = of_get_child_by_name(fw_features, "speculation-policy-favor-security");
+		if (np && of_property_read_bool(np, "disabled"))
+			enable = 0;
+
 		of_node_put(np);
 		of_node_put(fw_features);
 	}
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [1/2] powerpc/pseries: Support firmware disable of RFI flush
  2018-02-22 13:21 [PATCH 1/2] powerpc/pseries: Support firmware disable of RFI flush Michael Ellerman
  2018-02-22 13:21 ` [PATCH 2/2] powerpc/powernv: " Michael Ellerman
@ 2018-02-26  5:35 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2018-02-26  5:35 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev
  Cc: mikey, linuxram, npiggin, mauricfo, oohall, leitao

On Thu, 2018-02-22 at 13:21:17 UTC, Michael Ellerman wrote:
> Some versions of firmware will have a setting that can be configured
> to disable the RFI flush, add support for it.
> 
> Fixes: 8989d56878a7 ("powerpc/pseries: Query hypervisor for RFI flush settings")
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to powerpc fixes.

https://git.kernel.org/powerpc/c/582605a429e20ae68fd0b041b2e840

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [2/2] powerpc/powernv: Support firmware disable of RFI flush
  2018-02-22 13:21 ` [PATCH 2/2] powerpc/powernv: " Michael Ellerman
@ 2018-02-26  5:35   ` Michael Ellerman
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2018-02-26  5:35 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev
  Cc: mikey, linuxram, npiggin, mauricfo, oohall, leitao

On Thu, 2018-02-22 at 13:21:18 UTC, Michael Ellerman wrote:
> Some versions of firmware will have a setting that can be configured
> to disable the RFI flush, add support for it.
> 
> Fixes: 6e032b350cd1 ("powerpc/powernv: Check device-tree for RFI flush settings")
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to powerpc fixes.

https://git.kernel.org/powerpc/c/eb0a2d2620ae431c543963c8c7f08f

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-26  5:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-22 13:21 [PATCH 1/2] powerpc/pseries: Support firmware disable of RFI flush Michael Ellerman
2018-02-22 13:21 ` [PATCH 2/2] powerpc/powernv: " Michael Ellerman
2018-02-26  5:35   ` [2/2] " Michael Ellerman
2018-02-26  5:35 ` [1/2] powerpc/pseries: " Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).