summaryrefslogtreecommitdiffstats
path: root/drivers/xen/manage.c
diff options
context:
space:
mode:
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>2015-04-28 18:46:20 -0400
committerDavid Vrabel <david.vrabel@citrix.com>2015-04-29 12:10:05 -0400
commit2b953a5e994ce279904ec70220f7d4f31d380a0a (patch)
tree759a33813d003d3e020ba0ce1f34d12963398e09 /drivers/xen/manage.c
parentb44166cd46e28dd608d5baa5873047a40f32919c (diff)
xen: Suspend ticks on all CPUs during suspend
Commit 77e32c89a711 ("clockevents: Manage device's state separately for the core") decouples clockevent device's modes from states. With this change when a Xen guest tries to resume, it won't be calling its set_mode op which needs to be done on each VCPU in order to make the hypervisor aware that we are in oneshot mode. This happens because clockevents_tick_resume() (which is an intermediate step of resuming ticks on a processor) doesn't call clockevents_set_state() anymore and because during suspend clockevent devices on all VCPUs (except for the one doing the suspend) are left in ONESHOT state. As result, during resume the clockevents state machine will assume that device is already where it should be and doesn't need to be updated. To avoid this problem we should suspend ticks on all VCPUs during suspend. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'drivers/xen/manage.c')
-rw-r--r--drivers/xen/manage.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index bf1940706422..9e6a85104a20 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -131,6 +131,8 @@ static void do_suspend(void)
131 goto out_resume; 131 goto out_resume;
132 } 132 }
133 133
134 xen_arch_suspend();
135
134 si.cancelled = 1; 136 si.cancelled = 1;
135 137
136 err = stop_machine(xen_suspend, &si, cpumask_of(0)); 138 err = stop_machine(xen_suspend, &si, cpumask_of(0));
@@ -148,11 +150,12 @@ static void do_suspend(void)
148 si.cancelled = 1; 150 si.cancelled = 1;
149 } 151 }
150 152
153 xen_arch_resume();
154
151out_resume: 155out_resume:
152 if (!si.cancelled) { 156 if (!si.cancelled)
153 xen_arch_resume();
154 xs_resume(); 157 xs_resume();
155 } else 158 else
156 xs_suspend_cancel(); 159 xs_suspend_cancel();
157 160
158 dpm_resume_end(si.cancelled ? PMSG_THAW : PMSG_RESTORE); 161 dpm_resume_end(si.cancelled ? PMSG_THAW : PMSG_RESTORE);