qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] qemu-xen: add qemu xen logic for HVM S3 res


From: Anthony PERARD
Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-xen: add qemu xen logic for HVM S3 resume
Date: Tue, 3 Sep 2013 11:56:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130806 Thunderbird/17.0.8

On 01/09/13 10:54, Liu, Jinsong wrote:
> From e7d4bd70eae8da131dc3ff2cec70cb2c7b6575a9 Mon Sep 17 00:00:00 2001
> From: Liu Jinsong <address@hidden>
> Date: Mon, 2 Sep 2013 00:39:20 +0800
> Subject: [PATCH 2/2] qemu-xen: add qemu xen logic for HVM S3 resume
> 
> This patch is qemu-xen patch 2 to fix 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 <address@hidden>
> ---
>  xen-all.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/xen-all.c b/xen-all.c
> index 15be8ed..bef946b 100644
> --- a/xen-all.c
> +++ b/xen-all.c
> @@ -97,6 +97,7 @@ typedef struct XenIOState {
>  
>      Notifier exit;
>      Notifier suspend;
> +    Notifier later_wakeup;
>  } XenIOState;
>  
>  /* Xen specific function for piix pci */
> @@ -139,6 +140,11 @@ static void xen_suspend_notifier(Notifier *notifier, 
> void *data)
>      xc_set_hvm_param(xen_xc, xen_domid, HVM_PARAM_ACPI_S_STATE, 3);
>  }
>  
> +static void xen_later_wakeup_notifier(Notifier *notifier, void *data)
> +{
> +    xc_set_hvm_param(xen_xc, xen_domid, HVM_PARAM_ACPI_S_STATE, 0);
> +}
> +
>  /* Xen Interrupt Controller */
>  
>  static void xen_set_irq(void *opaque, int irq, int level)
> @@ -1106,6 +1112,9 @@ int xen_hvm_init(void)
>      state->suspend.notify = xen_suspend_notifier;
>      qemu_register_suspend_notifier(&state->suspend);
>  
> +    state->later_wakeup.notify = xen_later_wakeup_notifier;
> +    qemu_register_later_wakeup_notifier(&state->later_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,
> 

Acked-by: Anthony PERARD <address@hidden>

-- 
Anthony PERARD



reply via email to

[Prev in Thread] Current Thread [Next in Thread]