diff mbox series

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

Message ID 1561958399-28906-6-git-send-email-zhenzhong.duan@oracle.com (mailing list archive)
State Superseded
Headers show
Series misc fixes to PV extentions code | expand

Commit Message

Zhenzhong Duan July 1, 2019, 5:19 a.m. UTC
Map 'xen_nopv' to 'nopv' and mark 'xen_nopv' obsolete in
kernel-parameters.txt

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

Comments

Boris Ostrovsky July 2, 2019, 6:13 p.m. UTC | #1
On 7/1/19 1:19 AM, Zhenzhong Duan wrote:
> Map 'xen_nopv' to 'nopv' and mark 'xen_nopv' obsolete in
> kernel-parameters.txt

I am not sure we want patch #3, why not do everything in a single patch?


>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> ---
>  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;

pr_notice("\"xen_nopv\" is deprecated, please use \"nopv\" instead\n");


-boris

> +	return 0;
> +}
> +early_param("xen_nopv", xen_parse_nopv);
> +
>  bool __init xen_hvm_need_lapic(void)
>  {
>  	if (xen_pv_domain())
Zhenzhong Duan July 3, 2019, 2:14 a.m. UTC | #2
On 2019/7/3 2:13, Boris Ostrovsky wrote:
> On 7/1/19 1:19 AM, Zhenzhong Duan wrote:
>> Map 'xen_nopv' to 'nopv' and mark 'xen_nopv' obsolete in
>> kernel-parameters.txt
> I am not sure we want patch #3, why not do everything in a single patch?
>
Thanks for review. I'll fix all those based on your comments.

Zhenzhong
diff mbox series

Patch

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())