|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
Re: [Xen-devel] [PATCH] fix memory exchange hypercall.
> My understanding is as follows.
> - PGC_allocated means +1 page reference count.
> - It is neccessary for x86 paravirtualized domain to keep
> page from freeing.
More generally it provides the semantics that an allocated page is not freed
until or after it has been explicitly deallocated (so the deallocation
routine must test-and-clear that flag and -1 the refcnt if it was set).
> - It doesn't make sense for x86 hvm domain so that it is only cleared
> by relinquish_memory().
It will make sense as soon as x86 hvm guests can execute the
decrease_reservation memory_op. Intel have prototype code for this already.
It may not make 3.0.5-0, but it's not *that* far out.
> - If the p2m entry is cleared which isn't followed by
> clearing PGC_allocaed and put_page() without any recording,
> there is no easy way to free the page until domain destruction.
This is true. Arguably guest_physmap_add_page() should test-and-clear
PGC_allocated if there was already a page mapped at that address. Or it
should fail. Or we should expect the guest not to do something this silly.
Really the correct answer is not immediately clear. I guess the first option
makes most sense though, perhaps with a gdprintk(XENLOG_WARNING).
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|