OSDN Git Service

powerpc/64s: Support disabling RFI flush with no_rfi_flush and nopti
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 9 Jan 2018 16:07:15 +0000 (03:07 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Feb 2018 11:35:54 +0000 (12:35 +0100)
commit0ef9f8289edf1d335fb2bd3c162521528823b585
tree3049bf1c1a9f062f39c735d4a356bb86c6b604d7
parentc3b82ebee6e0d92431c92ee80393c023d550c8a1
powerpc/64s: Support disabling RFI flush with no_rfi_flush and nopti

commit bc9c9304a45480797e13a8e1df96ffcf44fb62fe upstream.

Because there may be some performance overhead of the RFI flush, add
kernel command line options to disable it.

We add a sensibly named 'no_rfi_flush' option, but we also hijack the
x86 option 'nopti'. The RFI flush is not the same as KPTI, but if we
see 'nopti' we can guess that the user is trying to avoid any overhead
of Meltdown mitigations, and it means we don't have to educate every
one about a different command line option.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/setup_64.c