WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] xen: suspend and resume system devices when runn

To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] xen: suspend and resume system devices when running PVHVM
From: Ian Campbell <ijc@xxxxxxxxxxxxxx>
Date: Thu, 17 Feb 2011 10:41:25 +0000
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Stefano
Delivery-date: Thu, 17 Feb 2011 02:42:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1297763645-23274-1-git-send-email-ian.campbell@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1297763645-23274-1-git-send-email-ian.campbell@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Linus,

I stuck this patch in a git branch since I wanted to base some future
work on it. Please pull instead of taking the patch if you see this in
time.

The following changes since commit 100b33c8bd8a3235fd0b7948338d6cbb3db3c63d:
  Linus Torvalds (1):
        Linux 2.6.38-rc4

are available in the git repository at:

  git://xenbits.xen.org/people/ianc/linux-2.6.git for-linus/bugfixes

Ian Campbell (1):
      xen: suspend and resume system devices when running PVHVM

 drivers/xen/manage.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
        
Ian.

On Tue, 2011-02-15 at 09:54 +0000, Ian Campbell 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>
> Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> Acked-by: 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);
> +     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;
>  }
>  

-- 
Ian Campbell
Current Noise: Godflesh - Locust Furnace

We can embody the truth, but we cannot know it.
                -- Yates


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>