xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Relationship between GuestOS shutdown and destroy operations?
@ 2012-09-21  4:35 Bruce Granger
  2012-09-21  8:07 ` Ian Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Granger @ 2012-09-21  4:35 UTC (permalink / raw)
  To: xen-devel

Hello everyone!

In my opinion, I think when we shutdown the GuestOS,
 Xen should free allocated vcpu and domain gived to GuestOS 
when it created at the same time. 

But I don’t find any code in functions associated with shutdown process to
show this work,
for example: 
Hvm_vcpu_down()-〉domain_shutdown()->__domain_finalise_shutdown()

But I find the functions free_vcpu_struct() and free_domain_struct() 
in the function complete_domain_destroy() in the process of destroy
operation, 
the code process is:
Domain_kill()->put_domain()->domain_destroy()->complete_domain_destroy()

Is that process right? Is there any relationship between them?
Does anyone know it?

Thanks for your help!



--
View this message in context: http://xen.1045712.n5.nabble.com/Relationship-between-GuestOS-shutdown-and-destroy-operations-tp5711423.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Relationship between GuestOS shutdown and destroy operations?
@ 2012-09-21  6:02 小黄豆
  0 siblings, 0 replies; 3+ messages in thread
From: 小黄豆 @ 2012-09-21  6:02 UTC (permalink / raw)
  To: Xen org


[-- Attachment #1.1: Type: text/plain, Size: 1024 bytes --]

Hello everyone!

In my opinion, I think when we shutdown the GuestOS,
 Xen should free allocated vcpu and domain gived to GuestOS 
when it created at the same time. 

But I don’t find any code in functions associated with shutdown process to
show this work,
for example: 
Hvm_vcpu_down()-〉domain_shutdown()->__domain_finalise_shutdown()

But I find the functions free_vcpu_struct() and free_domain_struct() 
in the function complete_domain_destroy() in the process of destroy
operation, 
the code process is:
Domain_kill()->put_domain()->domain_destroy()->complete_domain_destroy()

Is that process right? Is there any relationship between them?
Does anyone know it?

Thanks for your help!



--
View this message in context: http://xen.1045712.n5.nabble.com/Relationship-between-GuestOS-shutdown-and-destroy-operations-tp5711423.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

[-- Attachment #1.2: Type: text/html, Size: 1690 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Relationship between GuestOS shutdown and destroy operations?
  2012-09-21  4:35 Relationship between GuestOS shutdown and destroy operations? Bruce Granger
@ 2012-09-21  8:07 ` Ian Campbell
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2012-09-21  8:07 UTC (permalink / raw)
  To: Bruce Granger; +Cc: xen-devel@lists.xensource.com

On Fri, 2012-09-21 at 05:35 +0100, Bruce Granger wrote:
> Hello everyone!

Hello.

Please don't spam the list by resending effectively the same question 3
times in less than 1.5 hours. The xen-devel list membership is spread
over multiple time zones, so please leave enough time for people to
actually receive and digest your mails. Also be remember that you asking
people to take time out from whatever they are doing to reply to you and
they may not do so straight away.

Also please keep things in the same thread (you have started three
separate threads today) and remember quote from previous mails where
appropriate.

I recommend subscribing the list directly rather than using nabble since
that service tends to encourage quite poor netiquette.

You might find it useful to read
http://wiki.xen.org/wiki/Asking_Xen_Devel_Questions

> In my opinion, I think when we shutdown the GuestOS,
>  Xen should free allocated vcpu and domain gived to GuestOS 
> when it created at the same time. 

shutdown is a guest driven operation while destroy is toolstack driven.

The flow is that the guest shuts itself down (either by using PV
interfaces, SCHEDOP_shutdown or emulated means such as halting all
processors with interrupts disabled or via ACPI etc). This then causes a
signal to the toolstack which will then initiate the destroy, which
causes the hypervisor to finally teardown all the resources.

The signal to the toolstack is VIRQ_DOM_EXC which is received by the
xenstore daemon which then raises a watch called @releaseDomain. The
toolstack is watching for this and will initiate the final teardown of
the domain (or reboot it, or take a crash dump of its memory, or suspend
it, etc, as appropriate).

Ian.

> 
> But I don’t find any code in functions associated with shutdown process to
> show this work,
> for example: 
> Hvm_vcpu_down()-〉domain_shutdown()->__domain_finalise_shutdown()
> 
> But I find the functions free_vcpu_struct() and free_domain_struct() 
> in the function complete_domain_destroy() in the process of destroy
> operation, 
> the code process is:
> Domain_kill()->put_domain()->domain_destroy()->complete_domain_destroy()
> 
> Is that process right? Is there any relationship between them?
> Does anyone know it?
> 
> Thanks for your help!
> 
> 
> 
> --
> View this message in context: http://xen.1045712.n5.nabble.com/Relationship-between-GuestOS-shutdown-and-destroy-operations-tp5711423.html
> Sent from the Xen - Dev mailing list archive at Nabble.com.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-21  8:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21  4:35 Relationship between GuestOS shutdown and destroy operations? Bruce Granger
2012-09-21  8:07 ` Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2012-09-21  6:02 小黄豆

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).