[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V3 2/2] qemu: Add qemu xen logic for Xen HVM S3
From: |
Anthony PERARD |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130806 Thunderbird/17.0.8 |
On 09/09/13 04:28, Liu, Jinsong wrote:
> From 63668de43b6512c1db06405b0d2d1e0a0c68244b Mon Sep 17 00:00:00 2001
> From: Liu Jinsong <address@hidden>
> 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 <address@hidden>
> ---
> 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 <address@hidden>
--
Anthony PERARD