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

Re: [Xen-devel] SHUTDOWN_suspend

To: Jan Beulich <jbeulich@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] SHUTDOWN_suspend
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 17 Jan 2008 17:42:41 +0000
Delivery-date: Thu, 17 Jan 2008 09:43:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <478F98BA.76E4.0078.0@xxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AchZMFuXme410MUjEdyOuwAX8io7RQ==
Thread-topic: [Xen-devel] SHUTDOWN_suspend
User-agent: Microsoft-Entourage/11.3.6.070618
On 17/1/08 17:04, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> Could someone explain to me the mechanisms by which the
> SHUTDOWN_suspend sub-command of SCHEDOP_shutdown is handled?
> I am namely having a hard time finding where the non-zero return code
> unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c:bp_suspend()
> checks for gets injected.

The non-zero return code is injected by the tools: see
tools/libxc/xc_resume.c:modify_returncode().

> Besides that it puzzles me that this is being used differently by the
> pv-on-hvm drivers and the ones on a pv kernel: the latter pass an extra
> argument, the consumer of which I again cannot seem to be able to find.
> I'm specifically interested if it is valid to replace the pv drivers' use
> (through HYPERVISOR_shutdown()) with a call to HYPERVISOR_suspend(),
> and whether in that case passing just any value for the 'srec' parameter
> is possible.

The extra argument is not really consumed by the suspend hypercall. It ends
up in %esi when the hypercall occurs and can then be pulled out of the
vcpu's register context by the toolstack. This is simply a convention
between tools and guest -- Xen itself is not really involved.

HVM guests do not pass this extra parameter to the tools, because it is not
required.

 -- Keir



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

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