All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: "Liu, Jinsong" <jinsong.liu@intel.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH V3 2/2] qemu: Add qemu xen logic for Xen HVM S3 resume
Date: Tue, 10 Sep 2013 16:50:50 +0100	[thread overview]
Message-ID: <522F3FDA.2050702@citrix.com> (raw)
In-Reply-To: <DE8DF0795D48FD4CA783C40EC82923350136FF61@SHSMSX101.ccr.corp.intel.com>

On 09/09/13 04:28, Liu, Jinsong wrote:
> From 63668de43b6512c1db06405b0d2d1e0a0c68244b Mon Sep 17 00:00:00 2001
> From: Liu Jinsong <jinsong.liu@intel.com>
> Date: Sun, 8 Sep 2013 00:39:45 +0800
> Subject: [PATCH V3 2/2] qemu: Add qemu xen logic for Xen HVM S3 resume
> 
> This patch is qemu patch 2 to fix Xen HVM S3 bug, adding qemu
> xen logic. When qemu wakeup, qemu xen logic is notified and
> hypercall to xen hypervisor to unpause domain.
> 
> Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
> ---
>  xen-all.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/xen-all.c b/xen-all.c
> index eb13111..388d311 100644
> --- a/xen-all.c
> +++ b/xen-all.c
> @@ -98,6 +98,7 @@ typedef struct XenIOState {
>  
>      Notifier exit;
>      Notifier suspend;
> +    Notifier wakeup;
>  } XenIOState;
>  
>  /* Xen specific function for piix pci */
> @@ -1059,6 +1060,11 @@ static void xen_read_physmap(XenIOState *state)
>      free(entries);
>  }
>  
> +static void xen_wakeup_notifier(Notifier *notifier, void *data)
> +{
> +    xc_set_hvm_param(xen_xc, xen_domid, HVM_PARAM_ACPI_S_STATE, 0);
> +}
> +
>  int xen_hvm_init(void)
>  {
>      int i, rc;
> @@ -1088,6 +1094,9 @@ int xen_hvm_init(void)
>      state->suspend.notify = xen_suspend_notifier;
>      qemu_register_suspend_notifier(&state->suspend);
>  
> +    state->wakeup.notify = xen_wakeup_notifier;
> +    qemu_register_wakeup_notifier(&state->wakeup);
> +
>      xc_get_hvm_param(xen_xc, xen_domid, HVM_PARAM_IOREQ_PFN, &ioreq_pfn);
>      DPRINTF("shared page at pfn %lx\n", ioreq_pfn);
>      state->shared_page = xc_map_foreign_range(xen_xc, xen_domid, XC_PAGE_SIZE,
> 

Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>

-- 
Anthony PERARD

      parent reply	other threads:[~2013-09-10 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09  3:28 [Qemu-devel] [PATCH V3 2/2] qemu: Add qemu xen logic for Xen HVM S3 resume Liu, Jinsong
2013-09-10 15:50 ` Anthony PERARD
2013-09-10 15:50 ` Anthony PERARD [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=522F3FDA.2050702@citrix.com \
    --to=anthony.perard@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jinsong.liu@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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 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.