}
EXPORT_SYMBOL_GPL(xen_remap_domain_mfn_range);
-void __ref xen_hvm_init_shared_info(void)
+static void __init xen_hvm_init_shared_info(void)
{
int cpu;
struct xen_add_to_physmap xatp;
static struct shared_info *shared_info_page = 0;
+ /* already setup */
+ if (shared_info_page != 0 && HYPERVISOR_shared_info == shared_info_page)
+ return;
+
if (!shared_info_page)
shared_info_page = (struct shared_info *)
get_zeroed_page(GFP_KERNEL);
per_cpu(xen_vcpu, cpu) = &HYPERVISOR_shared_info->vcpu_info[cpu];
}
}
+core_initcall(xen_hvm_init_shared_info);
-static int __init xen_hvm_guest_init(void)
+int __init xen_guest_init(void)
{
xen_hvm_init_shared_info();
return 0;
}
-
-core_initcall(xen_hvm_guest_init);
+EXPORT_SYMBOL(xen_guest_init);
.init_platform = xen_hvm_guest_init,
};
EXPORT_SYMBOL(x86_hyper_xen_hvm);
+
+int __init xen_guest_init(void)
+{
+ /* do nothing: rely on x86_hyper_xen_hvm for the initialization */
+ return 0;
+
+}
+EXPORT_SYMBOL(xen_guest_init);
#endif
#ifdef CONFIG_XEN
extern enum xen_domain_type xen_domain_type;
+int xen_guest_init(void);
#else
#define xen_domain_type XEN_NATIVE
+static inline int xen_guest_init(void) { return 0; }
#endif
#define xen_domain() (xen_domain_type != XEN_NATIVE)