Skip to content

Commit cc8f3b4

Browse files
Zhenzhong Duanjgross1
authored andcommitted
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>
1 parent b39b049 commit cc8f3b4

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎arch/x86/include/asm/hypervisor.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ struct hypervisor_x86 {
5858
bool ignore_nopv;
5959
};
6060

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+
6169
extern bool nopv;
6270
extern enum x86_hypervisor_type x86_hyper_type;
6371
extern void init_hypervisor_platform(void);

‎arch/x86/kernel/cpu/hypervisor.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@
2626
#include <asm/processor.h>
2727
#include <asm/hypervisor.h>
2828

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-
3729
static const __initconst struct hypervisor_x86 * const hypervisors[] =
3830
{
3931
#ifdef CONFIG_XEN_PV

‎arch/x86/xen/enlighten_hvm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static __init void xen_hvm_guest_late_init(void)
259259
#endif
260260
}
261261

262-
const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
262+
struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
263263
.name = "Xen HVM",
264264
.detect = xen_platform_hvm,
265265
.type = X86_HYPER_XEN_HVM,

0 commit comments

Comments
 (0)