A question about SHARE_PFN_WITH_DOMAIN
Quoted 20 lines
From: Keir Fraser
Sent: 2006年1月13日 17:15Quoted 6 lines · Kevin
Quoted 3 lines
Secondly, there is the subtle and thorny issue of domain destruction. Xen assume that any domain that has a non-zero reference count has a valid
shared_info, for example.Could you please point out where I can find such assumption in the code?
Sure. For example, event channel bindings are torn down only when the domain refcnt falls to zero. If we freed the
shared_infopage when dom0 kills the domain, the refcnt may remain non-zero for some time after that (because of mappings of network/block ring pages for example). If dom0 tries to notify via an event channel, the evtchn code in Xen will happily dereference the dying domU'sshared_infopointer which would no longer be valid.
Quoted 5 lines
So we cannot free
shared_infountildomain_destruct(), and if Xen held a reference onshared_infothendomain_destruct()would never be called.-- Keir
Clear and make sense.
Thanks,
Kevin