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] Re: Reg domU shutdown

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Re: Reg domU shutdown
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 11 Jul 2008 15:30:00 +0100
Cc: Sandesh <sandesh.ahiremath@xxxxxxxxx>
Delivery-date: Fri, 11 Jul 2008 07:30:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1215767606.6220.13.camel@ec4t16cg-1518809>
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: <1215708675.4552.15.camel@ec4t16cg-1518809> <1215767606.6220.13.camel@ec4t16cg-1518809>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.9
On Friday 11 July 2008, Sandesh wrote:
> > I also looked at the xen drivers in domU kernel source. There i found
> > cpu_die func in drivers/xen/core/smpboot.c and am assuming this might be
> > the one invoked for shuting down domU.
>
> i think shutdown_handler of drivers/xen/core/reboot.c is used to
> terminate the guest. I want to know what mechanism is used to invoke
> it??
>  I see that it is setup as a watch function on xenbus. But how is it
> triggered??
> Please tell me if my understanding is correct.

I think you've got the right idea.

When you use the xm command, it talks to Xend in dom0 to instruct it to 
perform the appropriate management tasks.

The shutdown is then initiated by Xend in dom0 writing to Xenstore.  The 
Xenbus driver (the Linux interface to Xenstore) picks up this modification to 
Xenstore and forwards it on to the registered watcher, resulting in 
shutdown_handler() being called in reboot.c.  This in turn causes a userspace 
program to be run to initiate a clean domain shutdown.

Hope that helps.

Cheers,
Mark

Cheers,
Mark

-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)

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

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