|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] xen: suspend and resume system devices when runn
On Mon, Feb 14, 2011 at 9:32 AM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
> 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@xxxxxxxxxx>
> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
> ---
> 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);
Shouldnt this be PMSG_FREEZE ? based on the recent discussion with
linux-pm folks and the issue of xm save -c resulting in guest hangup.
> + 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
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 06/11] xen: suspend: pass extra hypercall argument via suspend_info struct, (continued)
- [Xen-devel] [PATCH 06/11] xen: suspend: pass extra hypercall argument via suspend_info struct, Ian Campbell
- [Xen-devel] [PATCH 07/11] xen: suspend: add "arch" to pre/post suspend hooks, Ian Campbell
- [Xen-devel] [PATCH 08/11] xen: suspend: refactor non-arch specific pre/post suspend hooks, Ian Campbell
- [Xen-devel] [PATCH 09/11] xen: suspend: move arch specific pre/post suspend hooks into generic hooks, Ian Campbell
- [Xen-devel] [PATCH 10/11] xen: suspend: pull pre/post suspend hooks out into suspend_info, Ian Campbell
- [Xen-devel] [PATCH 11/11] xen: suspend: remove xen_hvm_suspend, Ian Campbell
- [Xen-devel] Re: [PATCH 0/11] suspend cleanups, refactoring and fixes (Was: Re: [PATCH] xen: suspend and resume system devices when running PVHVM), Stefano Stabellini
- [Xen-devel] Re: [PATCH 0/11] suspend cleanups, refactoring and fixes (Was: Re: [PATCH] xen: suspend and resume system devices when running PVHVM), Ian Campbell
- [Xen-devel] Re: [PATCH 0/11] suspend cleanups, refactoring and fixes (Was: Re: [PATCH] xen: suspend and resume system devices when running PVHVM), Stefano Stabellini
- Re: [Xen-devel] [PATCH 0/11] suspend cleanups, refactoring and fixes (Was: Re: [PATCH] xen: suspend and resume system devices when running PVHVM), Konrad Rzeszutek Wilk
Re: [Xen-devel] [PATCH] xen: suspend and resume system devices when running PVHVM,
Shriram Rajagopalan <=
[Xen-devel] [PATCH] xen: suspend and resume system devices when running PVHVM, Ian Campbell
|
|
|
|
|