WARNING - OLD ARCHIVES

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

xen-ia64-devel

Re: [Xen-devel] [PATCH] fix memory exchange hypercall.

To: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] fix memory exchange hypercall.
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Thu, 15 Mar 2007 13:58:56 +0000
Cc: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 15 Mar 2007 06:58:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070315133819.GE1819%yamahata@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdnChJvUTvD/NL9Edu/SQAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH] fix memory exchange hypercall.
User-agent: Microsoft-Entourage/11.2.5.060620
> 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