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

[Xen-devel] From which place in source code Xen start to deal with the GuestOS shutdown operation?


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Bruce Granger <vivagin@xxxxxxxx>
  • Date: Thu, 20 Sep 2012 21:06:37 -0700 (PDT)
  • Delivery-date: Fri, 21 Sep 2012 07:46:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Hello everyone!
I feel I'm still a new baby though I have been study xen source code for
some days!
When I shutdown GuestOS, I want to get to know how Xen deal with the
operation? I find the code in xen\arch\x86\hvm\vlapic.c, see:
static int vlapic_accept_irq(struct vcpu *v, uint32_t icr_low)
{
ââ
switch ( icr_low & APIC_MODE_MASK )
{
ââ
    case APIC_DM_INIT:
        /* No work on INIT de-assert for P4-type APIC. */
        if ( (icr_low & (APIC_INT_LEVELTRIG | APIC_INT_ASSERT)) ==
             APIC_INT_LEVELTRIG )
            break;
        /* Nothing to do if the VCPU is already reset. */
        if ( !v->is_initialised )
            break;
        hvm_vcpu_down(v);
        rc = vlapic_schedule_init_sipi_tasklet(v, icr_low);
        break;
ââ
}
ââ
I think that when we input the shutdown command in GuestOS, xen will first
catch the APIC_DM_INIT and then call the
âhvm_vcpu_down(v)âãâdomain_shutdown()â and so on , is that right? If not,
where is the code entrance when shutdown operation occurs?



--
View this message in context: 
http://xen.1045712.n5.nabble.com/From-which-place-in-source-code-Xen-start-to-deal-with-the-GuestOS-shutdown-operation-tp5711422.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.