All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: suspend and resume system devices when running PVHVM
@ 2011-02-14 17:32 Ian Campbell
  2011-02-14 18:41 ` Stefano Stabellini
  2011-02-15  5:49 ` [PATCH] xen: suspend and resume system devices when running PVHVM Shriram Rajagopalan
  0 siblings, 2 replies; 24+ messages in thread
From: Ian Campbell @ 2011-02-14 17:32 UTC (permalink / raw)
  To: xen-devel; +Cc: Jeremy Fitzhardinge, Ian Campbell, Stefano Stabellini

Otherwise we fail to properly suspend/resume all of the emulated devices.

Something between 2.6.38-rc2 and rc3 appears to have exposed this
issue, but it's always been wrong not to do this.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
---
 drivers/xen/manage.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index db8c4c4..2417727 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -37,11 +37,19 @@ static enum shutdown_state shutting_down = SHUTDOWN_INVALID;
 #ifdef CONFIG_PM_SLEEP
 static int xen_hvm_suspend(void *data)
 {
+	int err;
 	struct sched_shutdown r = { .reason = SHUTDOWN_suspend };
 	int *cancelled = data;
 
 	BUG_ON(!irqs_disabled());
 
+	err = sysdev_suspend(PMSG_SUSPEND);
+	if (err) {
+		printk(KERN_ERR "xen_hvm_suspend: sysdev_suspend failed: %d\n",
+		       err);
+		return err;
+	}
+
 	*cancelled = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r);
 
 	xen_hvm_post_suspend(*cancelled);
@@ -53,6 +61,8 @@ static int xen_hvm_suspend(void *data)
 		xen_timer_resume();
 	}
 
+	sysdev_resume();
+
 	return 0;
 }
 
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2011-02-17 11:36 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-14 17:32 [PATCH] xen: suspend and resume system devices when running PVHVM Ian Campbell
2011-02-14 18:41 ` Stefano Stabellini
2011-02-14 18:59   ` Ian Campbell
2011-02-14 19:00     ` Stefano Stabellini
2011-02-14 23:30     ` Jeremy Fitzhardinge
2011-02-15  9:11       ` Ian Campbell
2011-02-15 14:13   ` [PATCH 0/11] suspend cleanups, refactoring and fixes (Was: Re: [PATCH] xen: suspend and resume system devices when running PVHVM) Ian Campbell
2011-02-15 14:13     ` [PATCH 01/11] xen: do not respond to unknown xenstore control requests Ian Campbell
2011-02-15 14:13     ` [PATCH 02/11] xen: use new schedop interface for suspend Ian Campbell
2011-02-15 14:13     ` [PATCH 03/11] xen: switch to new schedop hypercall by default Ian Campbell
2011-02-15 14:13     ` [PATCH 04/11] xen: suspend: use HYPERVISOR_suspend for PVHVM case instead of open coding Ian Campbell
2011-02-15 14:13     ` [PATCH 05/11] xen: suspend: refactor cancellation flag into a structure Ian Campbell
2011-02-15 14:13     ` [PATCH 06/11] xen: suspend: pass extra hypercall argument via suspend_info struct Ian Campbell
2011-02-15 14:13     ` [PATCH 07/11] xen: suspend: add "arch" to pre/post suspend hooks Ian Campbell
2011-02-15 14:13     ` [PATCH 08/11] xen: suspend: refactor non-arch specific " Ian Campbell
2011-02-15 14:13     ` [PATCH 09/11] xen: suspend: move arch specific pre/post suspend hooks into generic hooks Ian Campbell
2011-02-15 14:13     ` [PATCH 10/11] xen: suspend: pull pre/post suspend hooks out into suspend_info Ian Campbell
2011-02-15 14:13     ` [PATCH 11/11] xen: suspend: remove xen_hvm_suspend Ian Campbell
2011-02-15 16:45     ` [PATCH 0/11] suspend cleanups, refactoring and fixes (Was: Re: [PATCH] xen: suspend and resume system devices when running PVHVM) Stefano Stabellini
2011-02-17 11:08       ` Ian Campbell
2011-02-17 11:36         ` Stefano Stabellini
2011-02-15 18:36     ` Konrad Rzeszutek Wilk
2011-02-15  5:49 ` [PATCH] xen: suspend and resume system devices when running PVHVM Shriram Rajagopalan
2011-02-15  9:11   ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.