Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable

.. as "nopv" support needs it to be changeable at boot up stage.

Checkpatch reports warning, so move variable declarations from
hypervisor.c to hypervisor.h

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.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>
Signed-off-by: Juergen Gross <jgross@suse.com>

authored by

Zhenzhong Duan and committed by
Juergen Gross
cc8f3b4d b39b0497

+9 -9
+8
arch/x86/include/asm/hypervisor.h
··· 58 58 bool ignore_nopv; 59 59 }; 60 60 61 + extern const struct hypervisor_x86 x86_hyper_vmware; 62 + extern const struct hypervisor_x86 x86_hyper_ms_hyperv; 63 + extern const struct hypervisor_x86 x86_hyper_xen_pv; 64 + extern const struct hypervisor_x86 x86_hyper_kvm; 65 + extern const struct hypervisor_x86 x86_hyper_jailhouse; 66 + extern const struct hypervisor_x86 x86_hyper_acrn; 67 + extern struct hypervisor_x86 x86_hyper_xen_hvm; 68 + 61 69 extern bool nopv; 62 70 extern enum x86_hypervisor_type x86_hyper_type; 63 71 extern void init_hypervisor_platform(void);
-8
arch/x86/kernel/cpu/hypervisor.c
··· 26 26 #include <asm/processor.h> 27 27 #include <asm/hypervisor.h> 28 28 29 - extern const struct hypervisor_x86 x86_hyper_vmware; 30 - extern const struct hypervisor_x86 x86_hyper_ms_hyperv; 31 - extern const struct hypervisor_x86 x86_hyper_xen_pv; 32 - extern const struct hypervisor_x86 x86_hyper_xen_hvm; 33 - extern const struct hypervisor_x86 x86_hyper_kvm; 34 - extern const struct hypervisor_x86 x86_hyper_jailhouse; 35 - extern const struct hypervisor_x86 x86_hyper_acrn; 36 - 37 29 static const __initconst struct hypervisor_x86 * const hypervisors[] = 38 30 { 39 31 #ifdef CONFIG_XEN_PV
+1 -1
arch/x86/xen/enlighten_hvm.c
··· 259 259 #endif 260 260 } 261 261 262 - const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = { 262 + struct hypervisor_x86 x86_hyper_xen_hvm __initdata = { 263 263 .name = "Xen HVM", 264 264 .detect = xen_platform_hvm, 265 265 .type = X86_HYPER_XEN_HVM,