Commit 12c69f1e authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Thomas Gleixner
Browse files

x86/paravirt: Remove 'noreplace-paravirt' cmdline option

The 'noreplace-paravirt' option disables paravirt patching, leaving the
original pv indirect calls in place.

That's highly incompatible with retpolines, unless we want to uglify
paravirt even further and convert the paravirt calls to retpolines.

As far as I can tell, the option doesn't seem to be useful for much
other than introducing surprising corner cases and making the kernel
vulnerable to Spectre v2.  It was probably a debug option from the early
paravirt days.  So just remove it.

Signed-off-by: default avatarJosh Poimboeuf <>
Signed-off-by: default avatarThomas Gleixner <>
Reviewed-by: default avatarJuergen Gross <>
Cc: Andrea Arcangeli <>
Cc: Peter Zijlstra <>
Cc: Andi Kleen <>
Cc: Ashok Raj <>
Cc: Greg KH <>
Cc: Jun Nakajima <>
Cc: Tim Chen <>
Cc: Rusty Russell <>
Cc: Dave Hansen <>
Cc: Asit Mallick <>
Cc: Andy Lutomirski <>
Cc: Linus Torvalds <>
Cc: Jason Baron <>
Cc: Paolo Bonzini <>
Cc: Alok Kataria <>
Cc: Arjan Van De Ven <>
Cc: David Woodhouse <>
Cc: Dan Williams <>
parent 18bf3c3e
......@@ -2742,8 +2742,6 @@
norandmaps Don't use address space randomization. Equivalent to
echo 0 > /proc/sys/kernel/randomize_va_space
noreplace-paravirt [X86,IA-64,PV_OPS] Don't patch paravirt_ops
noreplace-smp [X86-32,SMP] Don't replace SMP instructions
with UP alternatives
......@@ -46,17 +46,6 @@ static int __init setup_noreplace_smp(char *str)
__setup("noreplace-smp", setup_noreplace_smp);
static int __initdata_or_module noreplace_paravirt = 0;
static int __init setup_noreplace_paravirt(char *str)
noreplace_paravirt = 1;
return 1;
__setup("noreplace-paravirt", setup_noreplace_paravirt);
#define DPRINTK(fmt, args...) \
do { \
if (debug_alternative) \
......@@ -599,9 +588,6 @@ void __init_or_module apply_paravirt(struct paravirt_patch_site *start,
struct paravirt_patch_site *p;
char insnbuf[MAX_PATCH_LEN];
if (noreplace_paravirt)
for (p = start; p < end; p++) {
unsigned int used;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment