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-devel

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

To: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] xenheap pages mapped by dom0
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 18 Dec 2009 16:40:37 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 18 Dec 2009 08:41:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B2BAB77.3020508@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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acp//dHE7FmaJBaoTlqcwGudhYQpKwAAwG7S
Thread-topic: [Xen-devel] xenheap pages mapped by dom0
User-agent: Microsoft-Entourage/12.23.0.091001
On 18/12/2009 16:19, "George Dunlap" <George.Dunlap@xxxxxxxxxxxxx> wrote:

> However, that brings up another point: suppose that I do several
> allocations, one per cpu, and one fails.  Now I want to go and free the
> buffers I've just allocated (which shouldn't be mapped in dom0 yet).
> Can I not just call free_xenheap_pages()? Do I need to clear
> PGC_allocated before calling?

Once you have called share_xen_page_with_guest(), dom0 can map that page at
any time and it is not safe to free_xenheap_page() without first checking
for guest mappings.

Perhaps you can lazily adjust tarce buffers downwards in size? I.e. Have a
go, remember if you fail, and try again on future buffer-adjustment
hypercalls?

> Is any of this stuff written down somewhere? :-)

No. :-)

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel