[PATCH v4 5/5] xen: Add 'xen_nopv' parameter back for backward compatibility

From: Zhenzhong Duan
Date: Tue Jul 02 2019 - 01:19:25 EST


Map 'xen_nopv' to 'nopv' and mark 'xen_nopv' obsolete in
kernel-parameters.txt

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@xxxxxxxxxx>
Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
---
Documentation/admin-guide/kernel-parameters.txt | 6 ++++++
arch/x86/xen/enlighten_hvm.c | 7 +++++++
2 files changed, 13 insertions(+)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index d5c3dcc..34eb323 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5264,6 +5264,12 @@
improve timer resolution at the expense of processing
more timer interrupts.

+ xen_nopv [X86]
+ Disables the PV optimizations forcing the HVM guest to
+ run as generic HVM guest with no PV drivers.
+ This option is obsoleted by the "nopv" option, which
+ has equivalent effect for XEN platform.
+
nopv= [X86,XEN,KVM,HYPER_V,VMWARE]
Disables the PV optimizations forcing the guest to run
as generic guest with no PV drivers. Currently support
diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
index 340dff8..5cdd608 100644
--- a/arch/x86/xen/enlighten_hvm.c
+++ b/arch/x86/xen/enlighten_hvm.c
@@ -211,6 +211,13 @@ static void __init xen_hvm_guest_init(void)
#endif
}

+static __init int xen_parse_nopv(char *arg)
+{
+ nopv = true;
+ return 0;
+}
+early_param("xen_nopv", xen_parse_nopv);
+
bool __init xen_hvm_need_lapic(void)
{
if (xen_pv_domain())
--
1.8.3.1