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/
Home Products Support Community News


Re: [Xen-devel] xenheap pages mapped by dom0

>>> George Dunlap <George.Dunlap@xxxxxxxxxxxxx> 18.12.09 15:04 >>>
>What's the standard practice regarding freeing xenheap pages that have
>been shared with dom0 (and may currently be mapped)?  Do we need to
>make sure they're unmapped before we free them, or can we just call
>free_xenheap_pages() and let the reference counting take care of
>actually freeing them when dom0 unmaps them (if ever)?

No, free_xenheap_pages() is what would be called when the refcount
drops to zero. What you need to do is, afaics, a simply
put_page_and_type(), which undoes the one type and one general
reference share_xen_page_with_guest() installed. This will then
either free the page right away (if Dom0 doesn't have it mapped) or
defer freeing until when Dom0 unmaps it.


Xen-devel mailing list