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] [PATCH 06/11] xen: suspend: pass extra hypercall argument vi

To: Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 06/11] xen: suspend: pass extra hypercall argument via suspend_info struct
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 15 Feb 2011 14:13:20 +0000
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Tue, 15 Feb 2011 06:20:13 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1297779181.21980.3722.camel@xxxxxxxxxxxxxxxxxxxxxx>
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: <1297779181.21980.3722.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 drivers/xen/manage.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 22af876..0647918 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -36,6 +36,7 @@ static enum shutdown_state shutting_down = SHUTDOWN_INVALID;
 
 struct suspend_info {
        int cancelled;
+       unsigned long arg; /* extra hypercall argument */
 };
 
 #ifdef CONFIG_PM_SLEEP
@@ -58,7 +59,7 @@ static int xen_hvm_suspend(void *data)
         * or the domain was merely checkpointed, and 0 if it
         * is resuming in a new domain.
         */
-       si->cancelled = HYPERVISOR_suspend(0UL);
+       si->cancelled = HYPERVISOR_suspend(si->arg);
 
        xen_hvm_post_suspend(si->cancelled);
        gnttab_resume();
@@ -97,7 +98,7 @@ static int xen_suspend(void *data)
         * or the domain was merely checkpointed, and 0 if it
         * is resuming in a new domain.
         */
-       si->cancelled = HYPERVISOR_suspend(virt_to_mfn(xen_start_info));
+       si->cancelled = HYPERVISOR_suspend(si->arg);
 
        xen_post_suspend(si->cancelled);
        gnttab_resume();
@@ -150,6 +151,11 @@ static void do_suspend(void)
        si.cancelled = 1;
 
        if (xen_hvm_domain())
+               si.arg = 0UL;
+       else
+               si.arg = virt_to_mfn(xen_start_info);
+
+       if (xen_hvm_domain())
                err = stop_machine(xen_hvm_suspend, &si, cpumask_of(0));
        else
                err = stop_machine(xen_suspend, &si, cpumask_of(0));
-- 
1.5.6.5


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

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