struct vcpu_register_vcpu_info info;
struct vcpu_info *vcpup;
int err;
+ int rc;
#if 0
/*
goto after_register_vcpu_info;
#endif
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 21, "<xen_starting_cpu 1>\n");
pr_info("Xen: initializing cpu%d\n", cpu);
vcpup = per_cpu_ptr(xen_vcpu_info, cpu);
after_register_vcpu_info:
xen_setup_runstate_info(cpu);
enable_percpu_irq(xen_events_irq, 0);
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 21, "<xen_starting_cpu 2>\n");
return 0;
}
void xen_vcpu_restore(void)
{
- xen_percpu_init();
+ unsigned int cpu = get_cpu();
+
+ xen_starting_cpu(cpu);
/* XXX TODO: xen_setup_runstate_info(cpu); */
}
{
struct suspend_info *si = data;
int err;
+ int rc;
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 16, "<xen_suspend 1>\n");
BUG_ON(!irqs_disabled());
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 16, "<xen_suspend 2>\n");
err = syscore_suspend();
if (err) {
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 16, "<xen_suspend 3>\n");
pr_err("%s: system core suspend failed: %d\n", __func__, err);
return err;
}
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 16, "<xen_suspend 4>\n");
gnttab_suspend();
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 16, "<xen_suspend 5>\n");
xen_arch_pre_suspend();
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 16, "<xen_suspend 6>\n");
/*
* This hypercall returns 1 if suspend was cancelled
* or the domain was merely checkpointed, and 0 if it
si->cancelled = HYPERVISOR_suspend(xen_pv_domain()
? virt_to_gfn(xen_start_info)
: 0);
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 16, "<xen_suspend 7>\n");
xen_arch_post_suspend(si->cancelled);
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 16, "<xen_suspend 8>\n");
gnttab_resume();
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 16, "<xen_suspend 9>\n");
if (!si->cancelled) {
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 17, "<xen_suspend 10>\n");
xen_irq_resume();
xen_timer_resume();
}
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 17, "<xen_suspend 11>\n");
syscore_resume();
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 17, "<xen_suspend 12>\n");
return 0;
}
{
int err;
struct suspend_info si;
+ int rc;
shutting_down = SHUTDOWN_SUSPEND;
goto out;
}
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 15, "<do_suspend 1>\n");
err = freeze_kernel_threads();
if (err) {
pr_err("%s: freeze kernel threads failed %d\n", __func__, err);
goto out_thaw;
}
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 15, "<do_suspend 2>\n");
err = dpm_suspend_start(PMSG_FREEZE);
if (err) {
pr_err("%s: dpm_suspend_start %d\n", __func__, err);
}
printk(KERN_DEBUG "suspending xenstore...\n");
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 15, "<do_suspend 3>\n");
xs_suspend();
err = dpm_suspend_end(PMSG_FREEZE);
goto out_resume;
}
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 15, "<do_suspend 4>\n");
xen_arch_suspend();
si.cancelled = 1;
err = stop_machine(xen_suspend, &si, cpumask_of(0));
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 15, "<do_suspend 5>\n");
/* Resume console as early as possible. */
if (!si.cancelled)
xen_console_resume();
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 15, "<do_suspend 6>\n");
raw_notifier_call_chain(&xen_resume_notifier, 0, NULL);
dpm_resume_start(si.cancelled ? PMSG_THAW : PMSG_RESTORE);
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 15, "<do_suspend 7>\n");
if (err) {
pr_err("failed to start xen_suspend: %d\n", err);
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 15, "<do_suspend 8>\n");
si.cancelled = 1;
}
xen_arch_resume(si.cancelled);
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 15, "<do_suspend 9>\n");
out_resume:
if (!si.cancelled)
else
xs_suspend_cancel();
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 16, "<do_suspend 10>\n");
+
dpm_resume_end(si.cancelled ? PMSG_THAW : PMSG_RESTORE);
out_thaw:
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 16, "<do_suspend 11>\n");
+
thaw_processes();
out:
+ rc = HYPERVISOR_console_io(CONSOLEIO_write, 16, "<do_suspend 12>\n");
+
shutting_down = SHUTDOWN_INVALID;
}
#endif /* CONFIG_HIBERNATE_CALLBACKS */