mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Campbell <ijc@hellion.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Jeremy Fitzhardinge <jeremy@goop.org>
Subject: Re: [PATCH] xen: suspend and resume system devices when running PVHVM
Date: Thu, 17 Feb 2011 10:41:25 +0000	[thread overview]
Message-ID: <1297939285.16356.1480.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <1297763645-23274-1-git-send-email-ian.campbell@citrix.com>

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@citrix.com>
> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> Acked-by: 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;
>  }
>  

-- 
Ian Campbell
Current Noise: Godflesh - Locust Furnace

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


      reply	other threads:[~2011-02-17 10:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-15  9:54 Ian Campbell
2011-02-17 10:41 ` Ian Campbell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1297939285.16356.1480.camel@zakaz.uk.xensource.com \
    --to=ijc@hellion.org.uk \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=torvalds@linux-foundation.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®