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: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xenheap pages mapped by dom0
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Fri, 18 Dec 2009 21:59:21 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Fri, 18 Dec 2009 13:59:48 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=NAf38WKkuKxY7yiX4sjO8OXOhjRnE/cS/T3Zyx5V2uw=; b=SjQrMobs6Q/NOyLHPW32BaNaGaUBxhVJiQ7Om8Wt4wx8tq5k55QUXuFyFbokxDmr8u E4Jxz83tE/vAxRjm1Yk14B9CmgL+J1sFVNjRyZ7btvKRNEu9lzuLaaXflTiOwcGIWjIM 5oYmP0v+OVPDHEPsubiNcFLe6oEzcGWExgmlY=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=umO6VfEcAH8NHZ+LAwYTP1Wg0fPa+p+LWnsiQ/lNAw6iE7qkHKj7mohWx8ZKlw8gOC 0goH3rybak2MDHK78T8omo6fzlxJanVpK/C3gvN2Y5U9RJ3tVJgtDEgwkk3QV4/lOmC7 wA8cyUlzM4yt8veGdEepVodCCy3yXUpSnfzCo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C7516105.4C74%keir.fraser@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>
References: <4B2BAB77.3020508@xxxxxxxxxxxxx> <C7516105.4C74%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, Dec 18, 2009 at 4:40 PM, Keir Fraser <keir.fraser@xxxxxxxxxxxxx> wrote:
> 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?

I don't expect buffer-adjustment to be a common thing, so the "lazy"
option might end up being incredibly lazy. :-)  My plan now is to do
alloc-once only (i.e., keeping the same semantics), and make all the
allocations before sharing the page with dom0.  In the future, I may
add the tear-down and check for reference count, with an "undo" if
there are still outstanding reference counts.  I think the most likely
reason to run into this scenario is if someone accidentally starts
xentrace or xenmon when there's already an instance of one of them
running, in which case the right thing to do is fail the new one and
let the user decide whether to kill the old process or not.

 -George

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